Skip to content

Commit

Permalink
Merge pull request #44188 from madmiraal/tabs-signal-names
Browse files Browse the repository at this point in the history
Rename Tabs close and hover signals to tab_closed and tab_hovered
  • Loading branch information
akien-mga authored Dec 8, 2020
2 parents 1cf53ca + a65e609 commit 0f6745b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions doc/classes/Tabs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
8 changes: 4 additions & 4 deletions scene/gui/tabs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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")));

Expand Down

0 comments on commit 0f6745b

Please sign in to comment.