From 83cb84753fb17d0c3e4dbe15388279ee93f97e3e Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 12 Jan 2017 00:51:08 -0300 Subject: 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). --- scene/gui/control.cpp | 20 ++++++++++---------- scene/gui/scroll_bar.cpp | 8 ++++---- scene/gui/spin_box.cpp | 2 +- scene/gui/tree.cpp | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'scene/gui') diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 437fbba0e9..054622668b 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -538,20 +538,20 @@ void Control::_notification(int p_notification) { } break; case NOTIFICATION_MOUSE_ENTER: { - emit_signal(SceneStringNames::get_singleton()->mouse_enter); + emit_signal(SceneStringNames::get_singleton()->mouse_entered); } break; case NOTIFICATION_MOUSE_EXIT: { - emit_signal(SceneStringNames::get_singleton()->mouse_exit); + emit_signal(SceneStringNames::get_singleton()->mouse_exited); } break; case NOTIFICATION_FOCUS_ENTER: { - emit_signal(SceneStringNames::get_singleton()->focus_enter); + emit_signal(SceneStringNames::get_singleton()->focus_entered); update(); } break; case NOTIFICATION_FOCUS_EXIT: { - emit_signal(SceneStringNames::get_singleton()->focus_exit); + emit_signal(SceneStringNames::get_singleton()->focus_exited); update(); } break; @@ -561,7 +561,7 @@ void Control::_notification(int p_notification) { } break; case NOTIFICATION_MODAL_CLOSE: { - emit_signal("modal_close"); + emit_signal("modal_closed"); } break; case NOTIFICATION_VISIBILITY_CHANGED: { @@ -2655,13 +2655,13 @@ void Control::_bind_methods() { ADD_SIGNAL( MethodInfo("resized") ); ADD_SIGNAL( MethodInfo("gui_input",PropertyInfo(Variant::INPUT_EVENT,"ev")) ); - ADD_SIGNAL( MethodInfo("mouse_enter") ); - ADD_SIGNAL( MethodInfo("mouse_exit") ); - ADD_SIGNAL( MethodInfo("focus_enter") ); - ADD_SIGNAL( MethodInfo("focus_exit") ); + ADD_SIGNAL( MethodInfo("mouse_entered") ); + ADD_SIGNAL( MethodInfo("mouse_exited") ); + ADD_SIGNAL( MethodInfo("focus_entered") ); + ADD_SIGNAL( MethodInfo("focus_exited") ); ADD_SIGNAL( MethodInfo("size_flags_changed") ); ADD_SIGNAL( MethodInfo("minimum_size_changed") ); - ADD_SIGNAL( MethodInfo("modal_close") ); + ADD_SIGNAL( MethodInfo("modal_closed") ); } diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index 0b32ca4952..2c44e51e5e 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -303,7 +303,7 @@ void ScrollBar::_notification(int p_what) { if (drag_slave) { 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) { 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; @@ -639,7 +639,7 @@ void ScrollBar::set_drag_slave(const NodePath& p_path) { if (drag_slave) { 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) { 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); } } } diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index 772d753da9..070f9fc72e 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -282,7 +282,7 @@ SpinBox::SpinBox() { line_edit->set_area_as_parent_rect(); //connect("value_changed",this,"_value_changed"); line_edit->connect("text_entered",this,"_text_entered",Vector(),CONNECT_DEFERRED); - line_edit->connect("focus_exit",this,"_line_edit_focus_exit",Vector(),CONNECT_DEFERRED); + line_edit->connect("focus_exited",this,"_line_edit_focus_exit",Vector(),CONNECT_DEFERRED); line_edit->connect("gui_input",this,"_line_edit_input"); drag.enabled=false; diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index f4f1fd8b9c..9f5b9f710d 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -3685,7 +3685,7 @@ Tree::Tree() { h_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("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"); value_editor->connect("value_changed", this,"_value_editor_changed"); -- cgit v1.2.3