diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-12-08 12:30:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 12:30:49 +0100 |
commit | 0f6745b6aabdab534049e8d1d49f8ddd41fcd1cb (patch) | |
tree | c3937a86f92ccf67859c8777e9812ed3faefccea | |
parent | 1cf53ca90b16841eed7a57d20f7442d50b49ead5 (diff) | |
parent | a65e609e217969b4b296598b8f3958b6df1233d9 (diff) |
Merge pull request #44188 from madmiraal/tabs-signal-names
Rename Tabs close and hover signals to tab_closed and tab_hovered
-rw-r--r-- | doc/classes/Tabs.xml | 4 | ||||
-rw-r--r-- | scene/gui/tabs.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index 5c698a4aa8..47cf869fe9 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -299,14 +299,14 @@ Emitted when a tab is clicked, even if it is the current tab. </description> </signal> - <signal name="tab_close"> + <signal name="tab_closed"> <argument index="0" name="tab" type="int"> </argument> <description> Emitted when a tab is closed. </description> </signal> - <signal name="tab_hover"> + <signal name="tab_hovered"> <argument index="0" name="tab" type="int"> </argument> <description> diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index 06e55deacb..5b26428e45 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -153,7 +153,7 @@ void Tabs::_gui_input(const Ref<InputEvent> &p_event) { if (cb_pressing && !mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) { if (cb_hover != -1) { //pressed - emit_signal("tab_close", cb_hover); + emit_signal("tab_closed", cb_hover); } cb_pressing = false; @@ -641,7 +641,7 @@ void Tabs::_update_hover() { } if (hover != hover_now) { hover = hover_now; - emit_signal("tab_hover", hover); + emit_signal("tab_hovered", hover); } if (hover_buttons == -1) { // no hover @@ -1114,8 +1114,8 @@ void Tabs::_bind_methods() { ADD_SIGNAL(MethodInfo("tab_changed", PropertyInfo(Variant::INT, "tab"))); ADD_SIGNAL(MethodInfo("right_button_pressed", PropertyInfo(Variant::INT, "tab"))); - ADD_SIGNAL(MethodInfo("tab_close", PropertyInfo(Variant::INT, "tab"))); - ADD_SIGNAL(MethodInfo("tab_hover", PropertyInfo(Variant::INT, "tab"))); + ADD_SIGNAL(MethodInfo("tab_closed", PropertyInfo(Variant::INT, "tab"))); + ADD_SIGNAL(MethodInfo("tab_hovered", PropertyInfo(Variant::INT, "tab"))); ADD_SIGNAL(MethodInfo("reposition_active_tab_request", PropertyInfo(Variant::INT, "idx_to"))); ADD_SIGNAL(MethodInfo("tab_clicked", PropertyInfo(Variant::INT, "tab"))); |