diff options
| author | Thaer Razeq | 2017-03-01 11:23:19 -0600 |
|---|---|---|
| committer | Thaer Razeq | 2017-03-05 02:47:09 -0600 |
| commit | c9bda06dfddd4cdd28517ff02df5c556fc70da0f (patch) | |
| tree | 1c9ac882dfe7e79e0e7eb7b1a552e0f383ef062e /scene/gui/tab_container.h | |
| parent | a1cbe8e22bec516b138436d06282046466e89c79 (diff) | |
| download | godot-c9bda06dfddd4cdd28517ff02df5c556fc70da0f.tar.gz godot-c9bda06dfddd4cdd28517ff02df5c556fc70da0f.tar.zst godot-c9bda06dfddd4cdd28517ff02df5c556fc70da0f.zip | |
- `tab_changed` signal emits only by selecting a different tab.
- Added `tab_selected` signal. Which emits a signal by selecting any tab, if current tab is selected again.
- Added `get_previous_tab()`. Which returns the previous shown tab. **Note:** only `tab_changed` can modify previous tab index.
- Add documentation for the added function and signals. Fix a typo too.
Diffstat (limited to '')
| -rw-r--r-- | scene/gui/tab_container.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/gui/tab_container.h b/scene/gui/tab_container.h index 67f631f86..d5a2801bb 100644 --- a/scene/gui/tab_container.h +++ b/scene/gui/tab_container.h @@ -50,6 +50,7 @@ private: int tabs_ofs_cache; int last_tab_cache; int current; + int previous; bool tabs_visible; bool buttons_visible_cache; TabAlign align; @@ -91,6 +92,7 @@ public: int get_tab_count() const; void set_current_tab(int p_current); int get_current_tab() const; + int get_previous_tab() const; Control* get_tab_control(int p_idx) const; Control* get_current_tab_control() const; |
