-Added configuration warning system for nodes

-Added a new "add" and "instance" buttons for scene tree
-Added a vformat() function to ease translation work
This commit is contained in:
Juan Linietsky 2016-05-17 18:27:15 -03:00
parent 3a26e14a2b
commit c195c0df6b
63 changed files with 531 additions and 146 deletions

View file

@ -198,13 +198,21 @@ void ParticleAttractor2D::set_particles_path(NodePath p_path) {
path=p_path;
_update_owner();
update_configuration_warning();
}
NodePath ParticleAttractor2D::get_particles_path() const {
return path;
}
String ParticleAttractor2D::get_configuration_warning() const {
if (!has_node(path) || !get_node(path) || !get_node(path)->cast_to<Particles2D>()) {
return TTR("Path property must point to a valid Particles2D node to work.");
}
return String();
}
ParticleAttractor2D::ParticleAttractor2D() {