diff options
author | Mansur Isaev <737dab2f169a@mail.ru> | 2024-03-07 15:18:27 +0400 |
---|---|---|
committer | Mansur Isaev <737dab2f169a@mail.ru> | 2024-04-23 08:28:48 +0400 |
commit | b37ddfc606a5cff69f7ba8dd4bd2ee3c09b6b5c2 (patch) | |
tree | fe2f23d468544cf254d2d93e0759fbe51f65b613 /scene/gui/tab_bar.h | |
parent | 7abe0c6014022874378cb64a11b26b0f0f178324 (diff) | |
download | redot-engine-b37ddfc606a5cff69f7ba8dd4bd2ee3c09b6b5c2.tar.gz |
Add tab tooltip text
Diffstat (limited to 'scene/gui/tab_bar.h')
-rw-r--r-- | scene/gui/tab_bar.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/gui/tab_bar.h b/scene/gui/tab_bar.h index 6c09e960f1..52f1da5ec8 100644 --- a/scene/gui/tab_bar.h +++ b/scene/gui/tab_bar.h @@ -56,6 +56,7 @@ public: private: struct Tab { String text; + String tooltip; String language; Control::TextDirection text_direction = Control::TEXT_DIRECTION_INHERITED; @@ -66,6 +67,8 @@ private: bool disabled = false; bool hidden = false; + bool truncated = false; + Variant metadata; int ofs_cache = 0; int size_cache = 0; @@ -168,6 +171,7 @@ private: protected: virtual void gui_input(const Ref<InputEvent> &p_event) override; + virtual String get_tooltip(const Point2 &p_pos) const override; bool _set(const StringName &p_name, const Variant &p_value) { return property_helper.property_set_value(p_name, p_value); } bool _get(const StringName &p_name, Variant &r_ret) const { return property_helper.property_get_value(p_name, r_ret); } @@ -192,6 +196,9 @@ public: void set_tab_title(int p_tab, const String &p_title); String get_tab_title(int p_tab) const; + void set_tab_tooltip(int p_tab, const String &p_tooltip); + String get_tab_tooltip(int p_tab) const; + void set_tab_text_direction(int p_tab, TextDirection p_text_direction); TextDirection get_tab_text_direction(int p_tab) const; |