summaryrefslogtreecommitdiff
path: root/scene/gui/tabs.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/tabs.h')
-rw-r--r--scene/gui/tabs.h20
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;