diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-10-19 18:48:34 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-10-19 18:48:34 -0300 |
commit | 2b12a8109dda1f47f9b75a5de91d7d00c1f25869 (patch) | |
tree | 3f3775c304e76ea2776d336c9a471d99359872c0 /scene/gui/tabs.h | |
parent | 5d86a25f4d04b21559f0d4edbd4e70dc01ea6685 (diff) | |
parent | 0a02c28b2be8e8271d5f3ffb95a4b09f91c3bd32 (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'scene/gui/tabs.h')
-rw-r--r-- | scene/gui/tabs.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h index 5cb0d9e916..1a8352bc93 100644 --- a/scene/gui/tabs.h +++ b/scene/gui/tabs.h @@ -42,6 +42,14 @@ public: ALIGN_CENTER, ALIGN_RIGHT }; + + enum CloseButtonDisplayPolicy { + + SHOW_ALWAYS, + SHOW_ACTIVE_ONLY, + SHOW_HOVER, + SHOW_NEVER + }; private: @@ -53,6 +61,8 @@ private: int size_cache; Ref<Texture> right_button; Rect2 rb_rect; + Ref<Texture> close_button; + Rect2 cb_rect; }; Vector<Tab> tabs; @@ -63,6 +73,12 @@ private: int rb_hover; bool rb_pressing; + int cb_hover; + bool cb_pressing; + CloseButtonDisplayPolicy cb_displaypolicy; + + int hover; // hovered tab + protected: void _input_event(const InputEvent& p_event); @@ -82,6 +98,10 @@ public: void set_tab_right_button(int p_tab,const Ref<Texture>& p_right_button); Ref<Texture> get_tab_right_button(int p_tab) const; + void set_tab_close_button(int p_tab, const Ref<Texture>& p_close_button); + Ref<Texture> get_tab_close_button(int p_tab) const; + void set_tab_close_display_policy(CloseButtonDisplayPolicy p_cb_displaypolicy); + void set_tab_align(TabAlign p_align); TabAlign get_tab_align() const; |