diff options
author | kit <kitbdev@gmail.com> | 2024-01-14 18:39:47 -0500 |
---|---|---|
committer | kit <kitbdev@gmail.com> | 2024-01-29 14:30:34 -0500 |
commit | 6e965f6c8337eb9946a5e3da7183d89aa53aac38 (patch) | |
tree | c8300188ec0ed2e4cb0f20b09a379cb9abf7c87b /scene/gui/tab_container.h | |
parent | fa48a51183567934984b381ad8ec281cb24d66ba (diff) | |
download | redot-engine-6e965f6c8337eb9946a5e3da7183d89aa53aac38.tar.gz |
Allow tab deselection
Diffstat (limited to 'scene/gui/tab_container.h')
-rw-r--r-- | scene/gui/tab_container.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scene/gui/tab_container.h b/scene/gui/tab_container.h index 0c645b4598..03eff5d944 100644 --- a/scene/gui/tab_container.h +++ b/scene/gui/tab_container.h @@ -56,7 +56,9 @@ private: bool theme_changing = false; Vector<Control *> children_removing; bool drag_to_rearrange_enabled = false; - int setup_current_tab = -1; + // Set the default setup current tab to be an invalid index. + int setup_current_tab = -2; + bool updating_visibility = false; struct ThemeCache { int side_margin = 0; @@ -108,6 +110,7 @@ private: void _on_tab_selected(int p_tab); void _on_tab_button_pressed(int p_tab); void _on_active_tab_rearranged(int p_tab); + void _on_tab_visibility_changed(Control *p_child); Variant _get_drag_data_fw(const Point2 &p_point, Control *p_from_control); bool _can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from_control) const; @@ -174,6 +177,9 @@ public: bool select_previous_available(); bool select_next_available(); + void set_deselect_enabled(bool p_enabled); + bool get_deselect_enabled() const; + Control *get_tab_control(int p_idx) const; Control *get_current_tab_control() const; |