Renamed most signals so they refer to:

-An action being requested to the user in present tense: (ie, draw, gui_input, etc)
-A notification that an action happened, in past tense (ie, area_entered, modal_closed, etc).
This commit is contained in:
Juan Linietsky 2017-01-12 00:51:08 -03:00
parent c84d618b4e
commit 83cb84753f
29 changed files with 239 additions and 239 deletions

View File

@ -127,10 +127,10 @@ void Area2D::_body_enter_tree(ObjectID p_id) {
ERR_FAIL_COND(E->get().in_tree); ERR_FAIL_COND(E->get().in_tree);
E->get().in_tree=true; E->get().in_tree=true;
emit_signal(SceneStringNames::get_singleton()->body_enter,node); emit_signal(SceneStringNames::get_singleton()->body_entered,node);
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->body_enter_shape,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].area_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_entered,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].area_shape);
} }
} }
@ -144,10 +144,10 @@ void Area2D::_body_exit_tree(ObjectID p_id) {
ERR_FAIL_COND(!E); ERR_FAIL_COND(!E);
ERR_FAIL_COND(!E->get().in_tree); ERR_FAIL_COND(!E->get().in_tree);
E->get().in_tree=false; E->get().in_tree=false;
emit_signal(SceneStringNames::get_singleton()->body_exit,node); emit_signal(SceneStringNames::get_singleton()->body_exited,node);
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->body_exit_shape,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].area_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_exited,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].area_shape);
} }
} }
@ -173,10 +173,10 @@ void Area2D::_body_inout(int p_status,const RID& p_body, int p_instance, int p_b
E->get().rc=0; E->get().rc=0;
E->get().in_tree=node && node->is_inside_tree(); E->get().in_tree=node && node->is_inside_tree();
if (node) { if (node) {
node->connect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_body_enter_tree,make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_body_enter_tree,make_binds(objid));
node->connect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_body_exit_tree,make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_body_exit_tree,make_binds(objid));
if (E->get().in_tree) { if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_enter,node); emit_signal(SceneStringNames::get_singleton()->body_entered,node);
} }
} }
@ -187,7 +187,7 @@ void Area2D::_body_inout(int p_status,const RID& p_body, int p_instance, int p_b
if (!node || E->get().in_tree) { if (!node || E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_enter_shape,objid,node,p_body_shape,p_area_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_entered,objid,node,p_body_shape,p_area_shape);
} }
} else { } else {
@ -202,10 +202,10 @@ void Area2D::_body_inout(int p_status,const RID& p_body, int p_instance, int p_b
if (E->get().rc==0) { if (E->get().rc==0) {
if (node) { if (node) {
node->disconnect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_body_enter_tree); node->disconnect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_body_enter_tree);
node->disconnect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_body_exit_tree); node->disconnect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_body_exit_tree);
if (E->get().in_tree) if (E->get().in_tree)
emit_signal(SceneStringNames::get_singleton()->body_exit,obj); emit_signal(SceneStringNames::get_singleton()->body_exited,obj);
} }
@ -213,7 +213,7 @@ void Area2D::_body_inout(int p_status,const RID& p_body, int p_instance, int p_b
} }
if (!node || E->get().in_tree) { if (!node || E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_exit_shape,objid,obj,p_body_shape,p_area_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_exited,objid,obj,p_body_shape,p_area_shape);
} }
if (eraseit) if (eraseit)
@ -239,10 +239,10 @@ void Area2D::_area_enter_tree(ObjectID p_id) {
ERR_FAIL_COND(E->get().in_tree); ERR_FAIL_COND(E->get().in_tree);
E->get().in_tree=true; E->get().in_tree=true;
emit_signal(SceneStringNames::get_singleton()->area_enter,node); emit_signal(SceneStringNames::get_singleton()->area_entered,node);
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->area_enter_shape,p_id,node,E->get().shapes[i].area_shape,E->get().shapes[i].self_shape); emit_signal(SceneStringNames::get_singleton()->area_shape_entered,p_id,node,E->get().shapes[i].area_shape,E->get().shapes[i].self_shape);
} }
} }
@ -256,10 +256,10 @@ void Area2D::_area_exit_tree(ObjectID p_id) {
ERR_FAIL_COND(!E); ERR_FAIL_COND(!E);
ERR_FAIL_COND(!E->get().in_tree); ERR_FAIL_COND(!E->get().in_tree);
E->get().in_tree=false; E->get().in_tree=false;
emit_signal(SceneStringNames::get_singleton()->area_exit,node); emit_signal(SceneStringNames::get_singleton()->area_exited,node);
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->area_exit_shape,p_id,node,E->get().shapes[i].area_shape,E->get().shapes[i].self_shape); emit_signal(SceneStringNames::get_singleton()->area_shape_exited,p_id,node,E->get().shapes[i].area_shape,E->get().shapes[i].self_shape);
} }
} }
@ -285,10 +285,10 @@ void Area2D::_area_inout(int p_status,const RID& p_area, int p_instance, int p_a
E->get().rc=0; E->get().rc=0;
E->get().in_tree=node && node->is_inside_tree(); E->get().in_tree=node && node->is_inside_tree();
if (node) { if (node) {
node->connect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_area_enter_tree,make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_area_enter_tree,make_binds(objid));
node->connect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_area_exit_tree,make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_area_exit_tree,make_binds(objid));
if (E->get().in_tree) { if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->area_enter,node); emit_signal(SceneStringNames::get_singleton()->area_entered,node);
} }
} }
@ -299,7 +299,7 @@ void Area2D::_area_inout(int p_status,const RID& p_area, int p_instance, int p_a
if (!node || E->get().in_tree) { if (!node || E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->area_enter_shape,objid,node,p_area_shape,p_self_shape); emit_signal(SceneStringNames::get_singleton()->area_shape_entered,objid,node,p_area_shape,p_self_shape);
} }
} else { } else {
@ -314,10 +314,10 @@ void Area2D::_area_inout(int p_status,const RID& p_area, int p_instance, int p_a
if (E->get().rc==0) { if (E->get().rc==0) {
if (node) { if (node) {
node->disconnect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_area_enter_tree); node->disconnect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_area_enter_tree);
node->disconnect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_area_exit_tree); node->disconnect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_area_exit_tree);
if (E->get().in_tree) if (E->get().in_tree)
emit_signal(SceneStringNames::get_singleton()->area_exit,obj); emit_signal(SceneStringNames::get_singleton()->area_exited,obj);
} }
@ -325,7 +325,7 @@ void Area2D::_area_inout(int p_status,const RID& p_area, int p_instance, int p_a
} }
if (!node || E->get().in_tree) { if (!node || E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->area_exit_shape,objid,obj,p_area_shape,p_self_shape); emit_signal(SceneStringNames::get_singleton()->area_shape_exited,objid,obj,p_area_shape,p_self_shape);
} }
if (eraseit) if (eraseit)
@ -362,13 +362,13 @@ void Area2D::_clear_monitoring() {
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->body_exit_shape,E->key(),node,E->get().shapes[i].body_shape,E->get().shapes[i].area_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_exited,E->key(),node,E->get().shapes[i].body_shape,E->get().shapes[i].area_shape);
} }
emit_signal(SceneStringNames::get_singleton()->body_exit,obj); emit_signal(SceneStringNames::get_singleton()->body_exited,obj);
node->disconnect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_body_enter_tree); node->disconnect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_body_enter_tree);
node->disconnect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_body_exit_tree); node->disconnect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_body_exit_tree);
} }
} }
@ -393,13 +393,13 @@ void Area2D::_clear_monitoring() {
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->area_exit_shape,E->key(),node,E->get().shapes[i].area_shape,E->get().shapes[i].self_shape); emit_signal(SceneStringNames::get_singleton()->area_shape_exited,E->key(),node,E->get().shapes[i].area_shape,E->get().shapes[i].self_shape);
} }
emit_signal(SceneStringNames::get_singleton()->area_exit,obj); emit_signal(SceneStringNames::get_singleton()->area_exited,obj);
node->disconnect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_area_enter_tree); node->disconnect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_area_enter_tree);
node->disconnect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_area_exit_tree); node->disconnect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_area_exit_tree);
} }
} }
@ -645,15 +645,15 @@ void Area2D::_bind_methods() {
ClassDB::bind_method(_MD("_area_inout"),&Area2D::_area_inout); ClassDB::bind_method(_MD("_area_inout"),&Area2D::_area_inout);
ADD_SIGNAL( MethodInfo("body_enter_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body",PROPERTY_HINT_RESOURCE_TYPE,"PhysicsBody2D"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"area_shape"))); ADD_SIGNAL( MethodInfo("body_shape_entered",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body",PROPERTY_HINT_RESOURCE_TYPE,"PhysicsBody2D"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"area_shape")));
ADD_SIGNAL( MethodInfo("body_exit_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body",PROPERTY_HINT_RESOURCE_TYPE,"PhysicsBody2D"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"area_shape"))); ADD_SIGNAL( MethodInfo("body_shape_exited",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body",PROPERTY_HINT_RESOURCE_TYPE,"PhysicsBody2D"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"area_shape")));
ADD_SIGNAL( MethodInfo("body_enter",PropertyInfo(Variant::OBJECT,"body",PROPERTY_HINT_RESOURCE_TYPE,"PhysicsBody2D"))); ADD_SIGNAL( MethodInfo("body_entered",PropertyInfo(Variant::OBJECT,"body",PROPERTY_HINT_RESOURCE_TYPE,"PhysicsBody2D")));
ADD_SIGNAL( MethodInfo("body_exit",PropertyInfo(Variant::OBJECT,"body",PROPERTY_HINT_RESOURCE_TYPE,"PhysicsBody2D"))); ADD_SIGNAL( MethodInfo("body_exited",PropertyInfo(Variant::OBJECT,"body",PROPERTY_HINT_RESOURCE_TYPE,"PhysicsBody2D")));
ADD_SIGNAL( MethodInfo("area_enter_shape",PropertyInfo(Variant::INT,"area_id"),PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D"),PropertyInfo(Variant::INT,"area_shape"),PropertyInfo(Variant::INT,"self_shape"))); ADD_SIGNAL( MethodInfo("area_shape_entered",PropertyInfo(Variant::INT,"area_id"),PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D"),PropertyInfo(Variant::INT,"area_shape"),PropertyInfo(Variant::INT,"self_shape")));
ADD_SIGNAL( MethodInfo("area_exit_shape",PropertyInfo(Variant::INT,"area_id"),PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D"),PropertyInfo(Variant::INT,"area_shape"),PropertyInfo(Variant::INT,"self_shape"))); ADD_SIGNAL( MethodInfo("area_shape_exited",PropertyInfo(Variant::INT,"area_id"),PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D"),PropertyInfo(Variant::INT,"area_shape"),PropertyInfo(Variant::INT,"self_shape")));
ADD_SIGNAL( MethodInfo("area_enter",PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D"))); ADD_SIGNAL( MethodInfo("area_entered",PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D")));
ADD_SIGNAL( MethodInfo("area_exit",PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D"))); ADD_SIGNAL( MethodInfo("area_exited",PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area2D")));
ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"space_override",PROPERTY_HINT_ENUM,"Disabled,Combine,Combine-Replace,Replace,Replace-Combine"),_SCS("set_space_override_mode"),_SCS("get_space_override_mode")); ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"space_override",PROPERTY_HINT_ENUM,"Disabled,Combine,Combine-Replace,Replace,Replace-Combine"),_SCS("set_space_override_mode"),_SCS("get_space_override_mode"));

View File

@ -196,7 +196,7 @@ void CollisionObject2D::_mouse_enter() {
if (get_script_instance()) { if (get_script_instance()) {
get_script_instance()->call(SceneStringNames::get_singleton()->_mouse_enter); get_script_instance()->call(SceneStringNames::get_singleton()->_mouse_enter);
} }
emit_signal(SceneStringNames::get_singleton()->mouse_enter); emit_signal(SceneStringNames::get_singleton()->mouse_entered);
} }
@ -205,7 +205,7 @@ void CollisionObject2D::_mouse_exit() {
if (get_script_instance()) { if (get_script_instance()) {
get_script_instance()->call(SceneStringNames::get_singleton()->_mouse_exit); get_script_instance()->call(SceneStringNames::get_singleton()->_mouse_exit);
} }
emit_signal(SceneStringNames::get_singleton()->mouse_exit); emit_signal(SceneStringNames::get_singleton()->mouse_exited);
} }
@ -239,8 +239,8 @@ void CollisionObject2D::_bind_methods() {
BIND_VMETHOD( MethodInfo("_input_event",PropertyInfo(Variant::OBJECT,"viewport"),PropertyInfo(Variant::INPUT_EVENT,"event"),PropertyInfo(Variant::INT,"shape_idx"))); BIND_VMETHOD( MethodInfo("_input_event",PropertyInfo(Variant::OBJECT,"viewport"),PropertyInfo(Variant::INPUT_EVENT,"event"),PropertyInfo(Variant::INT,"shape_idx")));
ADD_SIGNAL( MethodInfo("input_event",PropertyInfo(Variant::OBJECT,"viewport"),PropertyInfo(Variant::INPUT_EVENT,"event"),PropertyInfo(Variant::INT,"shape_idx"))); ADD_SIGNAL( MethodInfo("input_event",PropertyInfo(Variant::OBJECT,"viewport"),PropertyInfo(Variant::INPUT_EVENT,"event"),PropertyInfo(Variant::INT,"shape_idx")));
ADD_SIGNAL( MethodInfo("mouse_enter")); ADD_SIGNAL( MethodInfo("mouse_entered"));
ADD_SIGNAL( MethodInfo("mouse_exit")); ADD_SIGNAL( MethodInfo("mouse_exited"));
ADD_GROUP("Pickable","input_"); ADD_GROUP("Pickable","input_");
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"input_pickable"),_SCS("set_pickable"),_SCS("is_pickable")); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"input_pickable"),_SCS("set_pickable"),_SCS("is_pickable"));

View File

@ -98,7 +98,7 @@ void ParticleAttractor2D::_set_owner(Particles2D* p_owner) {
return; return;
if (owner) { if (owner) {
owner->disconnect("exit_tree",this,"_owner_exited"); owner->disconnect("tree_exited",this,"_owner_exited");
owner->attractors.erase(this); owner->attractors.erase(this);
owner=NULL; owner=NULL;
} }
@ -106,7 +106,7 @@ void ParticleAttractor2D::_set_owner(Particles2D* p_owner) {
if (owner) { if (owner) {
owner->connect("exit_tree",this,"_owner_exited",varray(),CONNECT_ONESHOT); owner->connect("tree_exited",this,"_owner_exited",varray(),CONNECT_ONESHOT);
owner->attractors.insert(this); owner->attractors.insert(this);
} }
} }

View File

@ -315,12 +315,12 @@ void RigidBody2D::_body_enter_tree(ObjectID p_id) {
contact_monitor->locked=true; contact_monitor->locked=true;
E->get().in_scene=true; E->get().in_scene=true;
emit_signal(SceneStringNames::get_singleton()->body_enter,node); emit_signal(SceneStringNames::get_singleton()->body_entered,node);
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->body_enter_shape,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].local_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_entered,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].local_shape);
} }
contact_monitor->locked=false; contact_monitor->locked=false;
@ -340,11 +340,11 @@ void RigidBody2D::_body_exit_tree(ObjectID p_id) {
contact_monitor->locked=true; contact_monitor->locked=true;
emit_signal(SceneStringNames::get_singleton()->body_exit,node); emit_signal(SceneStringNames::get_singleton()->body_exited,node);
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->body_exit_shape,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].local_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_exited,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].local_shape);
} }
contact_monitor->locked=false; contact_monitor->locked=false;
@ -377,10 +377,10 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
// E->get().rc=0; // E->get().rc=0;
E->get().in_scene=node && node->is_inside_tree(); E->get().in_scene=node && node->is_inside_tree();
if (node) { if (node) {
node->connect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_body_enter_tree,make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_body_enter_tree,make_binds(objid));
node->connect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_body_exit_tree,make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_body_exit_tree,make_binds(objid));
if (E->get().in_scene) { if (E->get().in_scene) {
emit_signal(SceneStringNames::get_singleton()->body_enter,node); emit_signal(SceneStringNames::get_singleton()->body_entered,node);
} }
} }
@ -392,7 +392,7 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
if (E->get().in_scene) { if (E->get().in_scene) {
emit_signal(SceneStringNames::get_singleton()->body_enter_shape,objid,node,p_body_shape,p_local_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_entered,objid,node,p_body_shape,p_local_shape);
} }
} else { } else {
@ -407,17 +407,17 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
if (E->get().shapes.empty()) { if (E->get().shapes.empty()) {
if (node) { if (node) {
node->disconnect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_body_enter_tree); node->disconnect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_body_enter_tree);
node->disconnect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_body_exit_tree); node->disconnect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_body_exit_tree);
if (in_scene) if (in_scene)
emit_signal(SceneStringNames::get_singleton()->body_exit,obj); emit_signal(SceneStringNames::get_singleton()->body_exited,obj);
} }
contact_monitor->body_map.erase(E); contact_monitor->body_map.erase(E);
} }
if (node && in_scene) { if (node && in_scene) {
emit_signal(SceneStringNames::get_singleton()->body_exit_shape,objid,obj,p_body_shape,p_local_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_exited,objid,obj,p_body_shape,p_local_shape);
} }
} }
@ -972,10 +972,10 @@ void RigidBody2D::_bind_methods() {
ADD_PROPERTY( PropertyInfo(Variant::REAL,"angular_velocity"),_SCS("set_angular_velocity"),_SCS("get_angular_velocity")); ADD_PROPERTY( PropertyInfo(Variant::REAL,"angular_velocity"),_SCS("set_angular_velocity"),_SCS("get_angular_velocity"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"angular_damp",PROPERTY_HINT_RANGE,"-1,128,0.01"),_SCS("set_angular_damp"),_SCS("get_angular_damp")); ADD_PROPERTY( PropertyInfo(Variant::REAL,"angular_damp",PROPERTY_HINT_RANGE,"-1,128,0.01"),_SCS("set_angular_damp"),_SCS("get_angular_damp"));
ADD_SIGNAL( MethodInfo("body_enter_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"local_shape"))); ADD_SIGNAL( MethodInfo("body_shape_entered",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"local_shape")));
ADD_SIGNAL( MethodInfo("body_exit_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"local_shape"))); ADD_SIGNAL( MethodInfo("body_shape_exited",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"local_shape")));
ADD_SIGNAL( MethodInfo("body_enter",PropertyInfo(Variant::OBJECT,"body"))); ADD_SIGNAL( MethodInfo("body_entered",PropertyInfo(Variant::OBJECT,"body")));
ADD_SIGNAL( MethodInfo("body_exit",PropertyInfo(Variant::OBJECT,"body"))); ADD_SIGNAL( MethodInfo("body_exited",PropertyInfo(Variant::OBJECT,"body")));
ADD_SIGNAL( MethodInfo("sleeping_state_changed")); ADD_SIGNAL( MethodInfo("sleeping_state_changed"));
BIND_CONSTANT( MODE_STATIC ); BIND_CONSTANT( MODE_STATIC );

View File

@ -44,11 +44,11 @@ void VisibilityNotifier2D::_enter_viewport(Viewport* p_viewport) {
return; return;
if (viewports.size()==1) { if (viewports.size()==1) {
emit_signal(SceneStringNames::get_singleton()->enter_screen); emit_signal(SceneStringNames::get_singleton()->screen_entered);
_screen_enter(); _screen_enter();
} }
emit_signal(SceneStringNames::get_singleton()->enter_viewport,p_viewport); emit_signal(SceneStringNames::get_singleton()->viewport_entered,p_viewport);
} }
@ -60,9 +60,9 @@ void VisibilityNotifier2D::_exit_viewport(Viewport* p_viewport){
if (is_inside_tree() && get_tree()->is_editor_hint()) if (is_inside_tree() && get_tree()->is_editor_hint())
return; return;
emit_signal(SceneStringNames::get_singleton()->exit_viewport,p_viewport); emit_signal(SceneStringNames::get_singleton()->viewport_exited,p_viewport);
if (viewports.size()==0) { if (viewports.size()==0) {
emit_signal(SceneStringNames::get_singleton()->exit_screen); emit_signal(SceneStringNames::get_singleton()->screen_exited);
_screen_exit(); _screen_exit();
} }
@ -135,10 +135,10 @@ void VisibilityNotifier2D::_bind_methods(){
ADD_PROPERTY( PropertyInfo(Variant::RECT2,"rect"),_SCS("set_rect"),_SCS("get_rect")); ADD_PROPERTY( PropertyInfo(Variant::RECT2,"rect"),_SCS("set_rect"),_SCS("get_rect"));
ADD_SIGNAL( MethodInfo("enter_viewport",PropertyInfo(Variant::OBJECT,"viewport",PROPERTY_HINT_RESOURCE_TYPE,"Viewport")) ); ADD_SIGNAL( MethodInfo("viewport_entered",PropertyInfo(Variant::OBJECT,"viewport",PROPERTY_HINT_RESOURCE_TYPE,"Viewport")) );
ADD_SIGNAL( MethodInfo("exit_viewport",PropertyInfo(Variant::OBJECT,"viewport",PROPERTY_HINT_RESOURCE_TYPE,"Viewport")) ); ADD_SIGNAL( MethodInfo("viewport_exited",PropertyInfo(Variant::OBJECT,"viewport",PROPERTY_HINT_RESOURCE_TYPE,"Viewport")) );
ADD_SIGNAL( MethodInfo("enter_screen")); ADD_SIGNAL( MethodInfo("screen_entered"));
ADD_SIGNAL( MethodInfo("exit_screen")); ADD_SIGNAL( MethodInfo("screen_exited"));
} }
@ -232,7 +232,7 @@ void VisibilityEnabler2D::_find_nodes(Node* p_node) {
if (add) { if (add) {
p_node->connect(SceneStringNames::get_singleton()->exit_tree,this,"_node_removed",varray(p_node),CONNECT_ONESHOT); p_node->connect(SceneStringNames::get_singleton()->tree_exited,this,"_node_removed",varray(p_node),CONNECT_ONESHOT);
nodes[p_node]=meta; nodes[p_node]=meta;
_change_node_state(p_node,false); _change_node_state(p_node,false);
} }
@ -280,7 +280,7 @@ void VisibilityEnabler2D::_notification(int p_what){
if (!visible) if (!visible)
_change_node_state(E->key(),true); _change_node_state(E->key(),true);
E->key()->disconnect(SceneStringNames::get_singleton()->exit_tree,this,"_node_removed"); E->key()->disconnect(SceneStringNames::get_singleton()->tree_exited,this,"_node_removed");
} }
nodes.clear(); nodes.clear();

View File

@ -126,10 +126,10 @@ void Area::_body_enter_tree(ObjectID p_id) {
ERR_FAIL_COND(E->get().in_tree); ERR_FAIL_COND(E->get().in_tree);
E->get().in_tree=true; E->get().in_tree=true;
emit_signal(SceneStringNames::get_singleton()->body_enter,node); emit_signal(SceneStringNames::get_singleton()->body_entered,node);
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->body_enter_shape,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].area_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_entered,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].area_shape);
} }
} }
@ -144,10 +144,10 @@ void Area::_body_exit_tree(ObjectID p_id) {
ERR_FAIL_COND(!E); ERR_FAIL_COND(!E);
ERR_FAIL_COND(!E->get().in_tree); ERR_FAIL_COND(!E->get().in_tree);
E->get().in_tree=false; E->get().in_tree=false;
emit_signal(SceneStringNames::get_singleton()->body_exit,node); emit_signal(SceneStringNames::get_singleton()->body_exited,node);
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->body_exit_shape,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].area_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_exited,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].area_shape);
} }
} }
@ -174,10 +174,10 @@ void Area::_body_inout(int p_status,const RID& p_body, int p_instance, int p_bod
E->get().rc=0; E->get().rc=0;
E->get().in_tree=node && node->is_inside_tree(); E->get().in_tree=node && node->is_inside_tree();
if (node) { if (node) {
node->connect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_body_enter_tree,make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_body_enter_tree,make_binds(objid));
node->connect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_body_exit_tree,make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_body_exit_tree,make_binds(objid));
if (E->get().in_tree) { if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_enter,node); emit_signal(SceneStringNames::get_singleton()->body_entered,node);
} }
} }
@ -188,7 +188,7 @@ void Area::_body_inout(int p_status,const RID& p_body, int p_instance, int p_bod
if (E->get().in_tree) { if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_enter_shape,objid,node,p_body_shape,p_area_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_entered,objid,node,p_body_shape,p_area_shape);
} }
} else { } else {
@ -203,10 +203,10 @@ void Area::_body_inout(int p_status,const RID& p_body, int p_instance, int p_bod
if (E->get().rc==0) { if (E->get().rc==0) {
if (node) { if (node) {
node->disconnect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_body_enter_tree); node->disconnect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_body_enter_tree);
node->disconnect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_body_exit_tree); node->disconnect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_body_exit_tree);
if (E->get().in_tree) if (E->get().in_tree)
emit_signal(SceneStringNames::get_singleton()->body_exit,obj); emit_signal(SceneStringNames::get_singleton()->body_exited,obj);
} }
@ -214,7 +214,7 @@ void Area::_body_inout(int p_status,const RID& p_body, int p_instance, int p_bod
} }
if (node && E->get().in_tree) { if (node && E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_exit_shape,objid,obj,p_body_shape,p_area_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_exited,objid,obj,p_body_shape,p_area_shape);
} }
if (eraseit) if (eraseit)
@ -250,13 +250,13 @@ void Area::_clear_monitoring() {
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->body_exit_shape,E->key(),node,E->get().shapes[i].body_shape,E->get().shapes[i].area_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_exited,E->key(),node,E->get().shapes[i].body_shape,E->get().shapes[i].area_shape);
} }
emit_signal(SceneStringNames::get_singleton()->body_exit,obj); emit_signal(SceneStringNames::get_singleton()->body_exited,obj);
node->disconnect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_body_enter_tree); node->disconnect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_body_enter_tree);
node->disconnect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_body_exit_tree); node->disconnect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_body_exit_tree);
} }
} }
@ -277,13 +277,13 @@ void Area::_clear_monitoring() {
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->area_exit_shape,E->key(),node,E->get().shapes[i].area_shape,E->get().shapes[i].self_shape); emit_signal(SceneStringNames::get_singleton()->area_shape_exited,E->key(),node,E->get().shapes[i].area_shape,E->get().shapes[i].self_shape);
} }
emit_signal(SceneStringNames::get_singleton()->area_exit,obj); emit_signal(SceneStringNames::get_singleton()->area_exited,obj);
node->disconnect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_area_enter_tree); node->disconnect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_area_enter_tree);
node->disconnect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_area_exit_tree); node->disconnect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_area_exit_tree);
} }
} }
@ -331,10 +331,10 @@ void Area::_area_enter_tree(ObjectID p_id) {
ERR_FAIL_COND(E->get().in_tree); ERR_FAIL_COND(E->get().in_tree);
E->get().in_tree=true; E->get().in_tree=true;
emit_signal(SceneStringNames::get_singleton()->area_enter,node); emit_signal(SceneStringNames::get_singleton()->area_entered,node);
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->area_enter_shape,p_id,node,E->get().shapes[i].area_shape,E->get().shapes[i].self_shape); emit_signal(SceneStringNames::get_singleton()->area_shape_entered,p_id,node,E->get().shapes[i].area_shape,E->get().shapes[i].self_shape);
} }
} }
@ -348,10 +348,10 @@ void Area::_area_exit_tree(ObjectID p_id) {
ERR_FAIL_COND(!E); ERR_FAIL_COND(!E);
ERR_FAIL_COND(!E->get().in_tree); ERR_FAIL_COND(!E->get().in_tree);
E->get().in_tree=false; E->get().in_tree=false;
emit_signal(SceneStringNames::get_singleton()->area_exit,node); emit_signal(SceneStringNames::get_singleton()->area_exited,node);
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->area_exit_shape,p_id,node,E->get().shapes[i].area_shape,E->get().shapes[i].self_shape); emit_signal(SceneStringNames::get_singleton()->area_shape_exited,p_id,node,E->get().shapes[i].area_shape,E->get().shapes[i].self_shape);
} }
} }
@ -378,10 +378,10 @@ void Area::_area_inout(int p_status,const RID& p_area, int p_instance, int p_are
E->get().rc=0; E->get().rc=0;
E->get().in_tree=node && node->is_inside_tree(); E->get().in_tree=node && node->is_inside_tree();
if (node) { if (node) {
node->connect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_area_enter_tree,make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_area_enter_tree,make_binds(objid));
node->connect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_area_exit_tree,make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_area_exit_tree,make_binds(objid));
if (E->get().in_tree) { if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->area_enter,node); emit_signal(SceneStringNames::get_singleton()->area_entered,node);
} }
} }
@ -393,7 +393,7 @@ void Area::_area_inout(int p_status,const RID& p_area, int p_instance, int p_are
if (!node || E->get().in_tree) { if (!node || E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->area_enter_shape,objid,node,p_area_shape,p_self_shape); emit_signal(SceneStringNames::get_singleton()->area_shape_entered,objid,node,p_area_shape,p_self_shape);
} }
} else { } else {
@ -408,10 +408,10 @@ void Area::_area_inout(int p_status,const RID& p_area, int p_instance, int p_are
if (E->get().rc==0) { if (E->get().rc==0) {
if (node) { if (node) {
node->disconnect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_area_enter_tree); node->disconnect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_area_enter_tree);
node->disconnect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_area_exit_tree); node->disconnect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_area_exit_tree);
if (E->get().in_tree) { if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->area_exit,obj); emit_signal(SceneStringNames::get_singleton()->area_exited,obj);
} }
} }
@ -420,7 +420,7 @@ void Area::_area_inout(int p_status,const RID& p_area, int p_instance, int p_are
} }
if (!node || E->get().in_tree) { if (!node || E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->area_exit_shape,objid,obj,p_area_shape,p_self_shape); emit_signal(SceneStringNames::get_singleton()->area_shape_exited,objid,obj,p_area_shape,p_self_shape);
} }
if (eraseit) if (eraseit)
@ -635,15 +635,15 @@ void Area::_bind_methods() {
ClassDB::bind_method(_MD("_area_inout"),&Area::_area_inout); ClassDB::bind_method(_MD("_area_inout"),&Area::_area_inout);
ADD_SIGNAL( MethodInfo("body_enter_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"area_shape"))); ADD_SIGNAL( MethodInfo("body_shape_entered",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"area_shape")));
ADD_SIGNAL( MethodInfo("body_exit_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"area_shape"))); ADD_SIGNAL( MethodInfo("body_shape_exited",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"area_shape")));
ADD_SIGNAL( MethodInfo("body_enter",PropertyInfo(Variant::OBJECT,"body"))); ADD_SIGNAL( MethodInfo("body_entered",PropertyInfo(Variant::OBJECT,"body")));
ADD_SIGNAL( MethodInfo("body_exit",PropertyInfo(Variant::OBJECT,"body"))); ADD_SIGNAL( MethodInfo("body_exited",PropertyInfo(Variant::OBJECT,"body")));
ADD_SIGNAL( MethodInfo("area_enter_shape",PropertyInfo(Variant::INT,"area_id"),PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area"),PropertyInfo(Variant::INT,"area_shape"),PropertyInfo(Variant::INT,"self_shape"))); ADD_SIGNAL( MethodInfo("area_shape_entered",PropertyInfo(Variant::INT,"area_id"),PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area"),PropertyInfo(Variant::INT,"area_shape"),PropertyInfo(Variant::INT,"self_shape")));
ADD_SIGNAL( MethodInfo("area_exit_shape",PropertyInfo(Variant::INT,"area_id"),PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area"),PropertyInfo(Variant::INT,"area_shape"),PropertyInfo(Variant::INT,"self_shape"))); ADD_SIGNAL( MethodInfo("area_shape_exited",PropertyInfo(Variant::INT,"area_id"),PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area"),PropertyInfo(Variant::INT,"area_shape"),PropertyInfo(Variant::INT,"self_shape")));
ADD_SIGNAL( MethodInfo("area_enter",PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area"))); ADD_SIGNAL( MethodInfo("area_entered",PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area")));
ADD_SIGNAL( MethodInfo("area_exit",PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area"))); ADD_SIGNAL( MethodInfo("area_exited",PropertyInfo(Variant::OBJECT,"area",PROPERTY_HINT_RESOURCE_TYPE,"Area")));
ADD_PROPERTY( PropertyInfo(Variant::INT,"space_override",PROPERTY_HINT_ENUM,"Disabled,Combine,Combine-Replace,Replace,Replace-Combine"),_SCS("set_space_override_mode"),_SCS("get_space_override_mode")); ADD_PROPERTY( PropertyInfo(Variant::INT,"space_override",PROPERTY_HINT_ENUM,"Disabled,Combine,Combine-Replace,Replace,Replace-Combine"),_SCS("set_space_override_mode"),_SCS("get_space_override_mode"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"gravity_point"),_SCS("set_gravity_is_point"),_SCS("is_gravity_a_point")); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"gravity_point"),_SCS("set_gravity_is_point"),_SCS("is_gravity_a_point"));

View File

@ -190,7 +190,7 @@ void CollisionObject::_mouse_enter() {
if (get_script_instance()) { if (get_script_instance()) {
get_script_instance()->call(SceneStringNames::get_singleton()->_mouse_enter); get_script_instance()->call(SceneStringNames::get_singleton()->_mouse_enter);
} }
emit_signal(SceneStringNames::get_singleton()->mouse_enter); emit_signal(SceneStringNames::get_singleton()->mouse_entered);
} }
@ -199,7 +199,7 @@ void CollisionObject::_mouse_exit() {
if (get_script_instance()) { if (get_script_instance()) {
get_script_instance()->call(SceneStringNames::get_singleton()->_mouse_exit); get_script_instance()->call(SceneStringNames::get_singleton()->_mouse_exit);
} }
emit_signal(SceneStringNames::get_singleton()->mouse_exit); emit_signal(SceneStringNames::get_singleton()->mouse_exited);
} }
@ -247,8 +247,8 @@ void CollisionObject::_bind_methods() {
BIND_VMETHOD( MethodInfo("_input_event",PropertyInfo(Variant::OBJECT,"camera"),PropertyInfo(Variant::INPUT_EVENT,"event"),PropertyInfo(Variant::VECTOR3,"click_pos"),PropertyInfo(Variant::VECTOR3,"click_normal"),PropertyInfo(Variant::INT,"shape_idx"))); BIND_VMETHOD( MethodInfo("_input_event",PropertyInfo(Variant::OBJECT,"camera"),PropertyInfo(Variant::INPUT_EVENT,"event"),PropertyInfo(Variant::VECTOR3,"click_pos"),PropertyInfo(Variant::VECTOR3,"click_normal"),PropertyInfo(Variant::INT,"shape_idx")));
ADD_SIGNAL( MethodInfo("input_event",PropertyInfo(Variant::OBJECT,"camera"),PropertyInfo(Variant::INPUT_EVENT,"event"),PropertyInfo(Variant::VECTOR3,"click_pos"),PropertyInfo(Variant::VECTOR3,"click_normal"),PropertyInfo(Variant::INT,"shape_idx"))); ADD_SIGNAL( MethodInfo("input_event",PropertyInfo(Variant::OBJECT,"camera"),PropertyInfo(Variant::INPUT_EVENT,"event"),PropertyInfo(Variant::VECTOR3,"click_pos"),PropertyInfo(Variant::VECTOR3,"click_normal"),PropertyInfo(Variant::INT,"shape_idx")));
ADD_SIGNAL( MethodInfo("mouse_enter")); ADD_SIGNAL( MethodInfo("mouse_entered"));
ADD_SIGNAL( MethodInfo("mouse_exit")); ADD_SIGNAL( MethodInfo("mouse_exited"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"input_ray_pickable"),_SCS("set_ray_pickable"),_SCS("is_ray_pickable")); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"input_ray_pickable"),_SCS("set_ray_pickable"),_SCS("is_ray_pickable"));
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"input_capture_on_drag"),_SCS("set_capture_input_on_drag"),_SCS("get_capture_input_on_drag")); ADD_PROPERTY(PropertyInfo(Variant::BOOL,"input_capture_on_drag"),_SCS("set_capture_input_on_drag"),_SCS("get_capture_input_on_drag"));

View File

@ -278,11 +278,11 @@ void RigidBody::_body_enter_tree(ObjectID p_id) {
contact_monitor->locked=true; contact_monitor->locked=true;
emit_signal(SceneStringNames::get_singleton()->body_enter,node); emit_signal(SceneStringNames::get_singleton()->body_entered,node);
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->body_enter_shape,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].local_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_entered,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].local_shape);
} }
contact_monitor->locked=false; contact_monitor->locked=false;
@ -302,11 +302,11 @@ void RigidBody::_body_exit_tree(ObjectID p_id) {
contact_monitor->locked=true; contact_monitor->locked=true;
emit_signal(SceneStringNames::get_singleton()->body_exit,node); emit_signal(SceneStringNames::get_singleton()->body_exited,node);
for(int i=0;i<E->get().shapes.size();i++) { for(int i=0;i<E->get().shapes.size();i++) {
emit_signal(SceneStringNames::get_singleton()->body_exit_shape,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].local_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_exited,p_id,node,E->get().shapes[i].body_shape,E->get().shapes[i].local_shape);
} }
contact_monitor->locked=false; contact_monitor->locked=false;
@ -332,10 +332,10 @@ void RigidBody::_body_inout(int p_status, ObjectID p_instance, int p_body_shape,
//E->get().rc=0; //E->get().rc=0;
E->get().in_tree=node && node->is_inside_tree(); E->get().in_tree=node && node->is_inside_tree();
if (node) { if (node) {
node->connect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_body_enter_tree,make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_body_enter_tree,make_binds(objid));
node->connect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_body_exit_tree,make_binds(objid)); node->connect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_body_exit_tree,make_binds(objid));
if (E->get().in_tree) { if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_enter,node); emit_signal(SceneStringNames::get_singleton()->body_entered,node);
} }
} }
@ -346,7 +346,7 @@ void RigidBody::_body_inout(int p_status, ObjectID p_instance, int p_body_shape,
if (E->get().in_tree) { if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_enter_shape,objid,node,p_body_shape,p_local_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_entered,objid,node,p_body_shape,p_local_shape);
} }
} else { } else {
@ -361,17 +361,17 @@ void RigidBody::_body_inout(int p_status, ObjectID p_instance, int p_body_shape,
if (E->get().shapes.empty()) { if (E->get().shapes.empty()) {
if (node) { if (node) {
node->disconnect(SceneStringNames::get_singleton()->enter_tree,this,SceneStringNames::get_singleton()->_body_enter_tree); node->disconnect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_body_enter_tree);
node->disconnect(SceneStringNames::get_singleton()->exit_tree,this,SceneStringNames::get_singleton()->_body_exit_tree); node->disconnect(SceneStringNames::get_singleton()->tree_exited,this,SceneStringNames::get_singleton()->_body_exit_tree);
if (in_tree) if (in_tree)
emit_signal(SceneStringNames::get_singleton()->body_exit,obj); emit_signal(SceneStringNames::get_singleton()->body_exited,obj);
} }
contact_monitor->body_map.erase(E); contact_monitor->body_map.erase(E);
} }
if (node && in_tree) { if (node && in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_exit_shape,objid,obj,p_body_shape,p_local_shape); emit_signal(SceneStringNames::get_singleton()->body_shape_exited,objid,obj,p_body_shape,p_local_shape);
} }
} }
@ -882,10 +882,10 @@ void RigidBody::_bind_methods() {
ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"angular_velocity"),_SCS("set_angular_velocity"),_SCS("get_angular_velocity")); ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"angular_velocity"),_SCS("set_angular_velocity"),_SCS("get_angular_velocity"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"angular_damp",PROPERTY_HINT_RANGE,"-1,128,0.01"),_SCS("set_angular_damp"),_SCS("get_angular_damp")); ADD_PROPERTY( PropertyInfo(Variant::REAL,"angular_damp",PROPERTY_HINT_RANGE,"-1,128,0.01"),_SCS("set_angular_damp"),_SCS("get_angular_damp"));
ADD_SIGNAL( MethodInfo("body_enter_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"local_shape"))); ADD_SIGNAL( MethodInfo("body_shape_entered",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"local_shape")));
ADD_SIGNAL( MethodInfo("body_exit_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"local_shape"))); ADD_SIGNAL( MethodInfo("body_shape_exited",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"local_shape")));
ADD_SIGNAL( MethodInfo("body_enter",PropertyInfo(Variant::OBJECT,"body"))); ADD_SIGNAL( MethodInfo("body_entered",PropertyInfo(Variant::OBJECT,"body")));
ADD_SIGNAL( MethodInfo("body_exit",PropertyInfo(Variant::OBJECT,"body"))); ADD_SIGNAL( MethodInfo("body_exited",PropertyInfo(Variant::OBJECT,"body")));
ADD_SIGNAL( MethodInfo("sleeping_state_changed")); ADD_SIGNAL( MethodInfo("sleeping_state_changed"));
BIND_CONSTANT( MODE_STATIC ); BIND_CONSTANT( MODE_STATIC );

View File

@ -38,10 +38,10 @@ void VisibilityNotifier::_enter_camera(Camera* p_camera) {
ERR_FAIL_COND(cameras.has(p_camera)); ERR_FAIL_COND(cameras.has(p_camera));
cameras.insert(p_camera); cameras.insert(p_camera);
if (cameras.size()==1) { if (cameras.size()==1) {
emit_signal(SceneStringNames::get_singleton()->enter_screen); emit_signal(SceneStringNames::get_singleton()->screen_entered);
_screen_enter(); _screen_enter();
} }
emit_signal(SceneStringNames::get_singleton()->enter_camera,p_camera); emit_signal(SceneStringNames::get_singleton()->camera_entered,p_camera);
} }
@ -50,9 +50,9 @@ void VisibilityNotifier::_exit_camera(Camera* p_camera){
ERR_FAIL_COND(!cameras.has(p_camera)); ERR_FAIL_COND(!cameras.has(p_camera));
cameras.erase(p_camera); cameras.erase(p_camera);
emit_signal(SceneStringNames::get_singleton()->exit_camera,p_camera); emit_signal(SceneStringNames::get_singleton()->camera_exited,p_camera);
if (cameras.size()==0) { if (cameras.size()==0) {
emit_signal(SceneStringNames::get_singleton()->exit_screen); emit_signal(SceneStringNames::get_singleton()->screen_exited);
_screen_exit(); _screen_exit();
@ -115,10 +115,10 @@ void VisibilityNotifier::_bind_methods(){
ADD_PROPERTY( PropertyInfo(Variant::RECT3,"aabb"),_SCS("set_aabb"),_SCS("get_aabb")); ADD_PROPERTY( PropertyInfo(Variant::RECT3,"aabb"),_SCS("set_aabb"),_SCS("get_aabb"));
ADD_SIGNAL( MethodInfo("enter_camera",PropertyInfo(Variant::OBJECT,"camera",PROPERTY_HINT_RESOURCE_TYPE,"Camera")) ); ADD_SIGNAL( MethodInfo("camera_entered",PropertyInfo(Variant::OBJECT,"camera",PROPERTY_HINT_RESOURCE_TYPE,"Camera")) );
ADD_SIGNAL( MethodInfo("exit_camera",PropertyInfo(Variant::OBJECT,"camera",PROPERTY_HINT_RESOURCE_TYPE,"Camera")) ); ADD_SIGNAL( MethodInfo("camera_exited",PropertyInfo(Variant::OBJECT,"camera",PROPERTY_HINT_RESOURCE_TYPE,"Camera")) );
ADD_SIGNAL( MethodInfo("enter_screen")); ADD_SIGNAL( MethodInfo("screen_entered"));
ADD_SIGNAL( MethodInfo("exit_screen")); ADD_SIGNAL( MethodInfo("screen_exited"));
} }
@ -183,7 +183,7 @@ void VisibilityEnabler::_find_nodes(Node* p_node) {
if (add) { if (add) {
p_node->connect(SceneStringNames::get_singleton()->exit_tree,this,"_node_removed",varray(p_node),CONNECT_ONESHOT); p_node->connect(SceneStringNames::get_singleton()->tree_exited,this,"_node_removed",varray(p_node),CONNECT_ONESHOT);
nodes[p_node]=meta; nodes[p_node]=meta;
_change_node_state(p_node,false); _change_node_state(p_node,false);
} }
@ -225,7 +225,7 @@ void VisibilityEnabler::_notification(int p_what){
if (!visible) if (!visible)
_change_node_state(E->key(),true); _change_node_state(E->key(),true);
E->key()->disconnect(SceneStringNames::get_singleton()->exit_tree,this,"_node_removed"); E->key()->disconnect(SceneStringNames::get_singleton()->tree_exited,this,"_node_removed");
} }
nodes.clear(); nodes.clear();
@ -260,7 +260,7 @@ void VisibilityEnabler::_node_removed(Node* p_node) {
if (!visible) if (!visible)
_change_node_state(p_node,true); _change_node_state(p_node,true);
p_node->disconnect(SceneStringNames::get_singleton()->exit_tree,this,"_node_removed"); p_node->disconnect(SceneStringNames::get_singleton()->tree_exited,this,"_node_removed");
nodes.erase(p_node); nodes.erase(p_node);
} }

View File

@ -59,7 +59,7 @@ void AnimationCache::_clear_cache() {
while(connected_nodes.size()) { while(connected_nodes.size()) {
connected_nodes.front()->get()->disconnect("exit_tree",this,"_node_exit_tree"); connected_nodes.front()->get()->disconnect("tree_exited",this,"_node_exit_tree");
connected_nodes.erase(connected_nodes.front()); connected_nodes.erase(connected_nodes.front());
} }
path_cache.clear();; path_cache.clear();;
@ -206,7 +206,7 @@ void AnimationCache::_update_cache() {
if (!connected_nodes.has(path.node)) { if (!connected_nodes.has(path.node)) {
connected_nodes.insert(path.node); connected_nodes.insert(path.node);
path.node->connect("exit_tree",this,"_node_exit_tree",Node::make_binds(path.node),CONNECT_ONESHOT); path.node->connect("tree_exited",this,"_node_exit_tree",Node::make_binds(path.node),CONNECT_ONESHOT);
} }

View File

@ -269,8 +269,8 @@ void AnimationPlayer::_generate_node_caches(AnimationData* p_anim) {
} }
{ {
if (!child->is_connected("exit_tree",this,"_node_removed")) if (!child->is_connected("tree_exited",this,"_node_removed"))
child->connect("exit_tree",this,"_node_removed",make_binds(child),CONNECT_ONESHOT); child->connect("tree_exited",this,"_node_removed",make_binds(child),CONNECT_ONESHOT);
} }
TrackNodeCacheKey key; TrackNodeCacheKey key;

View File

@ -221,9 +221,9 @@ void Tween::_bind_methods() {
ClassDB::bind_method(_MD("targeting_property","object","property","initial","initial_val","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::targeting_property, DEFVAL(0) ); ClassDB::bind_method(_MD("targeting_property","object","property","initial","initial_val","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::targeting_property, DEFVAL(0) );
ClassDB::bind_method(_MD("targeting_method","object","method","initial","initial_method","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::targeting_method, DEFVAL(0) ); ClassDB::bind_method(_MD("targeting_method","object","method","initial","initial_method","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::targeting_method, DEFVAL(0) );
ADD_SIGNAL( MethodInfo("tween_start", PropertyInfo( Variant::OBJECT,"object"), PropertyInfo( Variant::STRING,"key")) ); ADD_SIGNAL( MethodInfo("tween_started", PropertyInfo( Variant::OBJECT,"object"), PropertyInfo( Variant::STRING,"key")) );
ADD_SIGNAL( MethodInfo("tween_step", PropertyInfo( Variant::OBJECT,"object"), PropertyInfo( Variant::STRING,"key"), PropertyInfo( Variant::REAL,"elapsed"), PropertyInfo( Variant::OBJECT,"value")) ); ADD_SIGNAL( MethodInfo("tween_step", PropertyInfo( Variant::OBJECT,"object"), PropertyInfo( Variant::STRING,"key"), PropertyInfo( Variant::REAL,"elapsed"), PropertyInfo( Variant::OBJECT,"value")) );
ADD_SIGNAL( MethodInfo("tween_complete", PropertyInfo( Variant::OBJECT,"object"), PropertyInfo( Variant::STRING,"key")) ); ADD_SIGNAL( MethodInfo("tween_completed", PropertyInfo( Variant::OBJECT,"object"), PropertyInfo( Variant::STRING,"key")) );
ADD_PROPERTY( PropertyInfo( Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), _SCS("set_tween_process_mode"), _SCS("get_tween_process_mode")); ADD_PROPERTY( PropertyInfo( Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), _SCS("set_tween_process_mode"), _SCS("get_tween_process_mode"));
@ -573,7 +573,7 @@ void Tween::_tween_process(float p_delta) {
continue; continue;
else if(prev_delaying) { else if(prev_delaying) {
emit_signal("tween_start",object,data.key); emit_signal("tween_started",object,data.key);
_apply_tween_value(data, data.initial_val); _apply_tween_value(data, data.initial_val);
} }
@ -632,7 +632,7 @@ void Tween::_tween_process(float p_delta) {
_apply_tween_value(data, result); _apply_tween_value(data, result);
if (data.finish) { if (data.finish) {
emit_signal("tween_complete",object,data.key); emit_signal("tween_completed",object,data.key);
// not repeat mode, remove completed action // not repeat mode, remove completed action
if (!repeat) if (!repeat)
call_deferred("_remove", object, data.key, true); call_deferred("_remove", object, data.key, true);

View File

@ -538,20 +538,20 @@ void Control::_notification(int p_notification) {
} break; } break;
case NOTIFICATION_MOUSE_ENTER: { case NOTIFICATION_MOUSE_ENTER: {
emit_signal(SceneStringNames::get_singleton()->mouse_enter); emit_signal(SceneStringNames::get_singleton()->mouse_entered);
} break; } break;
case NOTIFICATION_MOUSE_EXIT: { case NOTIFICATION_MOUSE_EXIT: {
emit_signal(SceneStringNames::get_singleton()->mouse_exit); emit_signal(SceneStringNames::get_singleton()->mouse_exited);
} break; } break;
case NOTIFICATION_FOCUS_ENTER: { case NOTIFICATION_FOCUS_ENTER: {
emit_signal(SceneStringNames::get_singleton()->focus_enter); emit_signal(SceneStringNames::get_singleton()->focus_entered);
update(); update();
} break; } break;
case NOTIFICATION_FOCUS_EXIT: { case NOTIFICATION_FOCUS_EXIT: {
emit_signal(SceneStringNames::get_singleton()->focus_exit); emit_signal(SceneStringNames::get_singleton()->focus_exited);
update(); update();
} break; } break;
@ -561,7 +561,7 @@ void Control::_notification(int p_notification) {
} break; } break;
case NOTIFICATION_MODAL_CLOSE: { case NOTIFICATION_MODAL_CLOSE: {
emit_signal("modal_close"); emit_signal("modal_closed");
} break; } break;
case NOTIFICATION_VISIBILITY_CHANGED: { case NOTIFICATION_VISIBILITY_CHANGED: {
@ -2655,13 +2655,13 @@ void Control::_bind_methods() {
ADD_SIGNAL( MethodInfo("resized") ); ADD_SIGNAL( MethodInfo("resized") );
ADD_SIGNAL( MethodInfo("gui_input",PropertyInfo(Variant::INPUT_EVENT,"ev")) ); ADD_SIGNAL( MethodInfo("gui_input",PropertyInfo(Variant::INPUT_EVENT,"ev")) );
ADD_SIGNAL( MethodInfo("mouse_enter") ); ADD_SIGNAL( MethodInfo("mouse_entered") );
ADD_SIGNAL( MethodInfo("mouse_exit") ); ADD_SIGNAL( MethodInfo("mouse_exited") );
ADD_SIGNAL( MethodInfo("focus_enter") ); ADD_SIGNAL( MethodInfo("focus_entered") );
ADD_SIGNAL( MethodInfo("focus_exit") ); ADD_SIGNAL( MethodInfo("focus_exited") );
ADD_SIGNAL( MethodInfo("size_flags_changed") ); ADD_SIGNAL( MethodInfo("size_flags_changed") );
ADD_SIGNAL( MethodInfo("minimum_size_changed") ); ADD_SIGNAL( MethodInfo("minimum_size_changed") );
ADD_SIGNAL( MethodInfo("modal_close") ); ADD_SIGNAL( MethodInfo("modal_closed") );
} }

View File

@ -303,7 +303,7 @@ void ScrollBar::_notification(int p_what) {
if (drag_slave) { if (drag_slave) {
drag_slave->connect("gui_input",this,"_drag_slave_input"); drag_slave->connect("gui_input",this,"_drag_slave_input");
drag_slave->connect("exit_tree",this,"_drag_slave_exit",varray(),CONNECT_ONESHOT); drag_slave->connect("tree_exited",this,"_drag_slave_exit",varray(),CONNECT_ONESHOT);
} }
@ -312,7 +312,7 @@ void ScrollBar::_notification(int p_what) {
if (drag_slave) { if (drag_slave) {
drag_slave->disconnect("gui_input",this,"_drag_slave_input"); drag_slave->disconnect("gui_input",this,"_drag_slave_input");
drag_slave->disconnect("exit_tree",this,"_drag_slave_exit"); drag_slave->disconnect("tree_exited",this,"_drag_slave_exit");
} }
drag_slave=NULL; drag_slave=NULL;
@ -639,7 +639,7 @@ void ScrollBar::set_drag_slave(const NodePath& p_path) {
if (drag_slave) { if (drag_slave) {
drag_slave->disconnect("gui_input",this,"_drag_slave_input"); drag_slave->disconnect("gui_input",this,"_drag_slave_input");
drag_slave->disconnect("exit_tree",this,"_drag_slave_exit"); drag_slave->disconnect("tree_exited",this,"_drag_slave_exit");
} }
} }
@ -655,7 +655,7 @@ void ScrollBar::set_drag_slave(const NodePath& p_path) {
if (drag_slave) { if (drag_slave) {
drag_slave->connect("gui_input",this,"_drag_slave_input"); drag_slave->connect("gui_input",this,"_drag_slave_input");
drag_slave->connect("exit_tree",this,"_drag_slave_exit",varray(),CONNECT_ONESHOT); drag_slave->connect("tree_exited",this,"_drag_slave_exit",varray(),CONNECT_ONESHOT);
} }
} }
} }

View File

@ -282,7 +282,7 @@ SpinBox::SpinBox() {
line_edit->set_area_as_parent_rect(); line_edit->set_area_as_parent_rect();
//connect("value_changed",this,"_value_changed"); //connect("value_changed",this,"_value_changed");
line_edit->connect("text_entered",this,"_text_entered",Vector<Variant>(),CONNECT_DEFERRED); line_edit->connect("text_entered",this,"_text_entered",Vector<Variant>(),CONNECT_DEFERRED);
line_edit->connect("focus_exit",this,"_line_edit_focus_exit",Vector<Variant>(),CONNECT_DEFERRED); line_edit->connect("focus_exited",this,"_line_edit_focus_exit",Vector<Variant>(),CONNECT_DEFERRED);
line_edit->connect("gui_input",this,"_line_edit_input"); line_edit->connect("gui_input",this,"_line_edit_input");
drag.enabled=false; drag.enabled=false;

View File

@ -3685,7 +3685,7 @@ Tree::Tree() {
h_scroll->connect("value_changed", this,"_scroll_moved"); h_scroll->connect("value_changed", this,"_scroll_moved");
v_scroll->connect("value_changed", this,"_scroll_moved"); v_scroll->connect("value_changed", this,"_scroll_moved");
text_editor->connect("text_entered", this,"_text_editor_enter"); text_editor->connect("text_entered", this,"_text_editor_enter");
text_editor->connect("modal_close", this,"_text_editor_modal_close"); text_editor->connect("modal_closed", this,"_text_editor_modal_close");
popup_menu->connect("id_pressed", this,"_popup_select"); popup_menu->connect("id_pressed", this,"_popup_select");
value_editor->connect("value_changed", this,"_value_editor_changed"); value_editor->connect("value_changed", this,"_value_editor_changed");

View File

@ -232,7 +232,7 @@ void Node::_propagate_enter_tree() {
get_script_instance()->call_multilevel_reversed(SceneStringNames::get_singleton()->_enter_tree,NULL,0); get_script_instance()->call_multilevel_reversed(SceneStringNames::get_singleton()->_enter_tree,NULL,0);
} }
emit_signal(SceneStringNames::get_singleton()->enter_tree); emit_signal(SceneStringNames::get_singleton()->tree_entered);
data.blocked++; data.blocked++;
@ -298,7 +298,7 @@ void Node::_propagate_exit_tree() {
Variant::CallError err; Variant::CallError err;
get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_exit_tree,NULL,0); get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_exit_tree,NULL,0);
} }
emit_signal(SceneStringNames::get_singleton()->exit_tree); emit_signal(SceneStringNames::get_singleton()->tree_exited);
notification(NOTIFICATION_EXIT_TREE,true); notification(NOTIFICATION_EXIT_TREE,true);
if (data.tree) if (data.tree)
@ -3047,8 +3047,8 @@ void Node::_bind_methods() {
BIND_CONSTANT( PAUSE_MODE_PROCESS ); BIND_CONSTANT( PAUSE_MODE_PROCESS );
ADD_SIGNAL( MethodInfo("renamed") ); ADD_SIGNAL( MethodInfo("renamed") );
ADD_SIGNAL( MethodInfo("enter_tree") ); ADD_SIGNAL( MethodInfo("tree_entered") );
ADD_SIGNAL( MethodInfo("exit_tree") ); ADD_SIGNAL( MethodInfo("tree_exited") );
// ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/process" ),_SCS("set_process"),_SCS("is_processing") ); // ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/process" ),_SCS("set_process"),_SCS("is_processing") );
// ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/fixed_process" ), _SCS("set_fixed_process"),_SCS("is_fixed_processing") ); // ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/fixed_process" ), _SCS("set_fixed_process"),_SCS("is_fixed_processing") );

View File

@ -43,8 +43,8 @@ SceneStringNames::SceneStringNames() {
shader_shader=StaticCString::create("shader/shader"); shader_shader=StaticCString::create("shader/shader");
shader_unshaded=StaticCString::create("shader/unshaded"); shader_unshaded=StaticCString::create("shader/unshaded");
shading_mode=StaticCString::create("shader/shading_mode"); shading_mode=StaticCString::create("shader/shading_mode");
enter_tree=StaticCString::create("enter_tree"); tree_entered=StaticCString::create("tree_entered");
exit_tree=StaticCString::create("exit_tree"); tree_exited=StaticCString::create("tree_exited");
item_rect_changed=StaticCString::create("item_rect_changed"); item_rect_changed=StaticCString::create("item_rect_changed");
size_flags_changed=StaticCString::create("size_flags_changed"); size_flags_changed=StaticCString::create("size_flags_changed");
minimum_size_changed=StaticCString::create("minimum_size_changed"); minimum_size_changed=StaticCString::create("minimum_size_changed");
@ -55,21 +55,21 @@ SceneStringNames::SceneStringNames() {
animation_changed=StaticCString::create("animation_changed"); animation_changed=StaticCString::create("animation_changed");
animation_started=StaticCString::create("animation_started"); animation_started=StaticCString::create("animation_started");
mouse_enter=StaticCString::create("mouse_enter"); mouse_entered=StaticCString::create("mouse_entered");
mouse_exit=StaticCString::create("mouse_exit"); mouse_exited=StaticCString::create("mouse_exited");
focus_enter=StaticCString::create("focus_enter"); focus_entered=StaticCString::create("focus_entered");
focus_exit=StaticCString::create("focus_exit"); focus_exited=StaticCString::create("focus_exited");
sort_children = StaticCString::create("sort_children"); sort_children = StaticCString::create("sort_children");
body_enter_shape = StaticCString::create("body_enter_shape"); body_shape_entered = StaticCString::create("body_shape_entered");
body_enter = StaticCString::create("body_enter"); body_entered = StaticCString::create("body_entered");
body_exit_shape = StaticCString::create("body_exit_shape"); body_shape_exited = StaticCString::create("body_shape_exited");
body_exit = StaticCString::create("body_exit"); body_exited = StaticCString::create("body_exited");
area_enter_shape = StaticCString::create("area_enter_shape"); area_shape_entered = StaticCString::create("area_shape_entered");
area_exit_shape = StaticCString::create("area_exit_shape"); area_shape_exited = StaticCString::create("area_shape_exited");
_body_inout = StaticCString::create("_body_inout"); _body_inout = StaticCString::create("_body_inout");
_area_inout = StaticCString::create("_area_inout"); _area_inout = StaticCString::create("_area_inout");
@ -100,14 +100,14 @@ SceneStringNames::SceneStringNames() {
grouped=StaticCString::create("grouped"); grouped=StaticCString::create("grouped");
ungrouped=StaticCString::create("ungrouped"); ungrouped=StaticCString::create("ungrouped");
enter_screen=StaticCString::create("enter_screen"); screen_entered=StaticCString::create("screen_entered");
exit_screen=StaticCString::create("exit_screen"); screen_exited=StaticCString::create("screen_exited");
enter_viewport=StaticCString::create("enter_viewport"); viewport_entered=StaticCString::create("viewport_entered");
exit_viewport=StaticCString::create("exit_viewport"); viewport_exited=StaticCString::create("viewport_exited");
enter_camera=StaticCString::create("enter_camera"); camera_entered=StaticCString::create("camera_entered");
exit_camera=StaticCString::create("exit_camera"); camera_exited=StaticCString::create("camera_exited");
_body_enter_tree = StaticCString::create("_body_enter_tree"); _body_enter_tree = StaticCString::create("_body_enter_tree");
_body_exit_tree = StaticCString::create("_body_exit_tree"); _body_exit_tree = StaticCString::create("_body_exit_tree");
@ -145,8 +145,8 @@ SceneStringNames::SceneStringNames() {
get_minimum_size=StaticCString::create("get_minimum_size"); get_minimum_size=StaticCString::create("get_minimum_size");
area_enter=StaticCString::create("area_enter"); area_entered=StaticCString::create("area_entered");
area_exit=StaticCString::create("area_exit"); area_exited=StaticCString::create("area_exited");
has_point = StaticCString::create("has_point"); has_point = StaticCString::create("has_point");

View File

@ -60,8 +60,8 @@ public:
StringName shader_shader; StringName shader_shader;
StringName shader_unshaded; StringName shader_unshaded;
StringName shading_mode; StringName shading_mode;
StringName enter_tree; StringName tree_entered;
StringName exit_tree; StringName tree_exited;
StringName size_flags_changed; StringName size_flags_changed;
StringName minimum_size_changed; StringName minimum_size_changed;
StringName sleeping_state_changed; StringName sleeping_state_changed;
@ -72,10 +72,10 @@ public:
StringName line_separation; StringName line_separation;
StringName mouse_enter; StringName mouse_entered;
StringName mouse_exit; StringName mouse_exited;
StringName focus_enter; StringName focus_entered;
StringName focus_exit; StringName focus_exited;
StringName sort_children; StringName sort_children;
@ -84,13 +84,13 @@ public:
StringName animation_changed; StringName animation_changed;
StringName animation_started; StringName animation_started;
StringName body_enter_shape; StringName body_shape_entered;
StringName body_enter; StringName body_entered;
StringName body_exit_shape; StringName body_shape_exited;
StringName body_exit; StringName body_exited;
StringName area_enter_shape; StringName area_shape_entered;
StringName area_exit_shape; StringName area_shape_exited;
StringName _body_inout; StringName _body_inout;
StringName _area_inout; StringName _area_inout;
@ -128,12 +128,12 @@ public:
StringName can_drop_data; StringName can_drop_data;
StringName drop_data; StringName drop_data;
StringName enter_screen; StringName screen_entered;
StringName exit_screen; StringName screen_exited;
StringName enter_viewport; StringName viewport_entered;
StringName exit_viewport; StringName viewport_exited;
StringName enter_camera; StringName camera_entered;
StringName exit_camera; StringName camera_exited;
StringName _body_enter_tree; StringName _body_enter_tree;
StringName _body_exit_tree; StringName _body_exit_tree;
@ -161,8 +161,8 @@ public:
StringName _update_remote; StringName _update_remote;
StringName _update_pairs; StringName _update_pairs;
StringName area_enter; StringName area_entered;
StringName area_exit; StringName area_exited;
StringName get_minimum_size; StringName get_minimum_size;

View File

@ -3248,12 +3248,12 @@ void AnimationKeyEditor::set_animation(const Ref<Animation>& p_anim) {
void AnimationKeyEditor::set_root(Node *p_root) { void AnimationKeyEditor::set_root(Node *p_root) {
if (root) if (root)
root->disconnect("exit_tree",this,"_root_removed"); root->disconnect("tree_exited",this,"_root_removed");
root=p_root; root=p_root;
if (root) if (root)
root->connect("exit_tree",this,"_root_removed",make_binds(),CONNECT_ONESHOT); root->connect("tree_exited",this,"_root_removed",make_binds(),CONNECT_ONESHOT);
} }

View File

@ -851,7 +851,7 @@ void EditorSelection::add_node(Node *p_node) {
} }
selection[p_node]=meta; selection[p_node]=meta;
p_node->connect("exit_tree",this,"_node_removed",varray(p_node),CONNECT_ONESHOT); p_node->connect("tree_exited",this,"_node_removed",varray(p_node),CONNECT_ONESHOT);
//emit_signal("selection_changed"); //emit_signal("selection_changed");
} }
@ -869,7 +869,7 @@ void EditorSelection::remove_node(Node *p_node) {
if (meta) if (meta)
memdelete(meta); memdelete(meta);
selection.erase(p_node); selection.erase(p_node);
p_node->disconnect("exit_tree",this,"_node_removed"); p_node->disconnect("tree_exited",this,"_node_removed");
//emit_signal("selection_changed"); //emit_signal("selection_changed");
} }
bool EditorSelection::is_selected(Node * p_node) const { bool EditorSelection::is_selected(Node * p_node) const {

View File

@ -200,7 +200,7 @@ EditorLog::EditorLog() {
pc = memnew( PanelContainer ); pc = memnew( PanelContainer );
ec->add_child(pc); ec->add_child(pc);
pc->set_area_as_parent_rect(); pc->set_area_as_parent_rect();
pc->connect("enter_tree", this, "_override_logger_styles"); pc->connect("tree_entered", this, "_override_logger_styles");
log = memnew( RichTextLabel ); log = memnew( RichTextLabel );
log->set_scroll_follow(true); log->set_scroll_follow(true);

View File

@ -5621,7 +5621,7 @@ EditorNode::EditorNode() {
dock_select->set_custom_minimum_size(Size2(128,64)*EDSCALE); dock_select->set_custom_minimum_size(Size2(128,64)*EDSCALE);
dock_select->connect("gui_input",this,"_dock_select_input"); dock_select->connect("gui_input",this,"_dock_select_input");
dock_select->connect("draw",this,"_dock_select_draw"); dock_select->connect("draw",this,"_dock_select_draw");
dock_select->connect("mouse_exit",this,"_dock_popup_exit"); dock_select->connect("mouse_exited",this,"_dock_popup_exit");
dock_select->set_v_size_flags(Control::SIZE_EXPAND_FILL); dock_select->set_v_size_flags(Control::SIZE_EXPAND_FILL);
dock_vb->add_child(dock_select); dock_vb->add_child(dock_select);

View File

@ -714,7 +714,7 @@ EditorProfiler::EditorProfiler()
//graph->set_ignore_mouse(false); //graph->set_ignore_mouse(false);
graph->connect("draw",this,"_graph_tex_draw"); graph->connect("draw",this,"_graph_tex_draw");
graph->connect("gui_input",this,"_graph_tex_input"); graph->connect("gui_input",this,"_graph_tex_input");
graph->connect("mouse_exit",this,"_graph_tex_mouse_exit"); graph->connect("mouse_exited",this,"_graph_tex_mouse_exit");
h_split->add_child(graph); h_split->add_child(graph);
graph->set_h_size_flags(SIZE_EXPAND_FILL); graph->set_h_size_flags(SIZE_EXPAND_FILL);

View File

@ -3971,9 +3971,9 @@ void CanvasItemEditorViewport::drop_data(const Point2& p_point,const Variant& p_
void CanvasItemEditorViewport::_notification(int p_what) { void CanvasItemEditorViewport::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) { if (p_what==NOTIFICATION_ENTER_TREE) {
connect("mouse_exit",this,"_on_mouse_exit"); connect("mouse_exited",this,"_on_mouse_exit");
} else if (p_what==NOTIFICATION_EXIT_TREE) { } else if (p_what==NOTIFICATION_EXIT_TREE) {
disconnect("mouse_exit",this,"_on_mouse_exit"); disconnect("mouse_exited",this,"_on_mouse_exit");
} }
} }

View File

@ -1853,7 +1853,7 @@ void SpatialEditorViewport::_notification(int p_what) {
surface->connect("draw",this,"_draw"); surface->connect("draw",this,"_draw");
surface->connect("gui_input",this,"_sinput"); surface->connect("gui_input",this,"_sinput");
surface->connect("mouse_enter",this,"_smouseenter"); surface->connect("mouse_entered",this,"_smouseenter");
preview_camera->set_icon(get_icon("Camera","EditorIcons")); preview_camera->set_icon(get_icon("Camera","EditorIcons"));
_init_gizmo_instance(index); _init_gizmo_instance(index);
} }
@ -2150,7 +2150,7 @@ void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) {
if (!p_activate) { if (!p_activate) {
previewing->disconnect("exit_tree",this,"_preview_exited_scene"); previewing->disconnect("tree_exited",this,"_preview_exited_scene");
previewing=NULL; previewing=NULL;
VS::get_singleton()->viewport_attach_camera( viewport->get_viewport(), camera->get_camera() ); //restore VS::get_singleton()->viewport_attach_camera( viewport->get_viewport(), camera->get_camera() ); //restore
if (!preview) if (!preview)
@ -2161,7 +2161,7 @@ void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) {
} else { } else {
previewing=preview; previewing=preview;
previewing->connect("exit_tree",this,"_preview_exited_scene"); previewing->connect("tree_exited",this,"_preview_exited_scene");
VS::get_singleton()->viewport_attach_camera( viewport->get_viewport(), preview->get_camera() ); //replace VS::get_singleton()->viewport_attach_camera( viewport->get_viewport(), preview->get_camera() ); //replace
view_menu->hide(); view_menu->hide();
surface->update(); surface->update();
@ -2266,7 +2266,7 @@ void SpatialEditorViewport::set_state(const Dictionary& p_state) {
Node *pv = EditorNode::get_singleton()->get_edited_scene()->get_node(p_state["previewing"]); Node *pv = EditorNode::get_singleton()->get_edited_scene()->get_node(p_state["previewing"]);
if (pv && pv->cast_to<Camera>()) { if (pv && pv->cast_to<Camera>()) {
previewing=pv->cast_to<Camera>(); previewing=pv->cast_to<Camera>();
previewing->connect("exit_tree",this,"_preview_exited_scene"); previewing->connect("tree_exited",this,"_preview_exited_scene");
VS::get_singleton()->viewport_attach_camera( viewport->get_viewport(), previewing->get_camera() ); //replace VS::get_singleton()->viewport_attach_camera( viewport->get_viewport(), previewing->get_camera() ); //replace
view_menu->hide(); view_menu->hide();
surface->update(); surface->update();

View File

@ -653,17 +653,17 @@ void TextureRegionEditor::edit(Object *p_obj)
p_obj->connect("texture_changed",this,"_edit_region"); p_obj->connect("texture_changed",this,"_edit_region");
} }
p_obj->add_change_receptor(this); p_obj->add_change_receptor(this);
p_obj->connect("exit_tree",this,"_node_removed",varray(p_obj),CONNECT_ONESHOT); p_obj->connect("tree_exited",this,"_node_removed",varray(p_obj),CONNECT_ONESHOT);
_edit_region(); _edit_region();
} else { } else {
if(node_sprite) if(node_sprite)
node_sprite->disconnect("exit_tree",this,"_node_removed"); node_sprite->disconnect("tree_exited",this,"_node_removed");
else if(node_patch9) else if(node_patch9)
node_patch9->disconnect("exit_tree",this,"_node_removed"); node_patch9->disconnect("tree_exited",this,"_node_removed");
else if(obj_styleBox.is_valid()) else if(obj_styleBox.is_valid())
obj_styleBox->disconnect("exit_tree",this,"_node_removed"); obj_styleBox->disconnect("tree_exited",this,"_node_removed");
else if(atlas_tex.is_valid()) else if(atlas_tex.is_valid())
atlas_tex->disconnect("exit_tree",this,"_node_removed"); atlas_tex->disconnect("tree_exited",this,"_node_removed");
node_sprite = NULL; node_sprite = NULL;
node_patch9 = NULL; node_patch9 = NULL;

View File

@ -1302,10 +1302,10 @@ void TileMapEditor::edit(Node *p_tile_map) {
node=p_tile_map->cast_to<TileMap>(); node=p_tile_map->cast_to<TileMap>();
if (!canvas_item_editor->is_connected("draw",this,"_canvas_draw")) if (!canvas_item_editor->is_connected("draw",this,"_canvas_draw"))
canvas_item_editor->connect("draw",this,"_canvas_draw"); canvas_item_editor->connect("draw",this,"_canvas_draw");
if (!canvas_item_editor->is_connected("mouse_enter",this,"_canvas_mouse_enter")) if (!canvas_item_editor->is_connected("mouse_entered",this,"_canvas_mouse_enter"))
canvas_item_editor->connect("mouse_enter",this,"_canvas_mouse_enter"); canvas_item_editor->connect("mouse_entered",this,"_canvas_mouse_enter");
if (!canvas_item_editor->is_connected("mouse_exit",this,"_canvas_mouse_exit")) if (!canvas_item_editor->is_connected("mouse_exited",this,"_canvas_mouse_exit"))
canvas_item_editor->connect("mouse_exit",this,"_canvas_mouse_exit"); canvas_item_editor->connect("mouse_exited",this,"_canvas_mouse_exit");
_update_palette(); _update_palette();
@ -1314,10 +1314,10 @@ void TileMapEditor::edit(Node *p_tile_map) {
if (canvas_item_editor->is_connected("draw",this,"_canvas_draw")) if (canvas_item_editor->is_connected("draw",this,"_canvas_draw"))
canvas_item_editor->disconnect("draw",this,"_canvas_draw"); canvas_item_editor->disconnect("draw",this,"_canvas_draw");
if (canvas_item_editor->is_connected("mouse_enter",this,"_canvas_mouse_enter")) if (canvas_item_editor->is_connected("mouse_entered",this,"_canvas_mouse_enter"))
canvas_item_editor->disconnect("mouse_enter",this,"_canvas_mouse_enter"); canvas_item_editor->disconnect("mouse_entered",this,"_canvas_mouse_enter");
if (canvas_item_editor->is_connected("mouse_exit",this,"_canvas_mouse_exit")) if (canvas_item_editor->is_connected("mouse_exited",this,"_canvas_mouse_exit"))
canvas_item_editor->disconnect("mouse_exit",this,"_canvas_mouse_exit"); canvas_item_editor->disconnect("mouse_exited",this,"_canvas_mouse_exit");
_update_palette(); _update_palette();
} }

View File

@ -2000,8 +2000,8 @@ CustomPropertyEditor::CustomPropertyEditor() {
value_editor[i]->hide(); value_editor[i]->hide();
value_label[i]->hide(); value_label[i]->hide();
value_editor[i]->connect("text_entered", this,"_modified"); value_editor[i]->connect("text_entered", this,"_modified");
value_editor[i]->connect("focus_enter", this, "_focus_enter"); value_editor[i]->connect("focus_entered", this, "_focus_enter");
value_editor[i]->connect("focus_exit", this, "_focus_exit"); value_editor[i]->connect("focus_exited", this, "_focus_exit");
} }
for(int i=0;i<4;i++) { for(int i=0;i<4;i++) {