summaryrefslogtreecommitdiff
path: root/scene/gui/button_array.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-10-17 10:05:42 +0200
committerGitHub <noreply@github.com>2016-10-17 10:05:42 +0200
commit048bffd13a49067e646f65152c3cc6b87bacc1c3 (patch)
tree1f3e18b4e51ef2a703eaba20a24f388c0a235b94 /scene/gui/button_array.h
parent345f82d4ca0c091ad9a323149351cfebeab8c9cb (diff)
parent38caa4ef918ef064f1b74fe9416b02fd517958c2 (diff)
Merge pull request #6806 from leezh/button_array_fixes
ButtonArray fixes and improvements
Diffstat (limited to 'scene/gui/button_array.h')
-rw-r--r--scene/gui/button_array.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/scene/gui/button_array.h b/scene/gui/button_array.h
index c4b9b0c9e3..62997a8e36 100644
--- a/scene/gui/button_array.h
+++ b/scene/gui/button_array.h
@@ -50,6 +50,7 @@ private:
struct Button {
String text;
+ String tooltip;
Ref<Texture> icon;
mutable int _ms_cache;
mutable int _pos_cache;
@@ -78,14 +79,16 @@ public:
void set_align(Align p_align);
Align get_align() const;
- void add_button(const String& p_button);
- void add_icon_button(const Ref<Texture>& p_icon,const String& p_button="");
+ void add_button(const String& p_button,const String& p_tooltip="");
+ void add_icon_button(const Ref<Texture>& p_icon,const String& p_button="",const String& p_tooltip="");
void set_button_text(int p_button, const String& p_text);
+ void set_button_tooltip(int p_button, const String& p_text);
void set_button_icon(int p_button, const Ref<Texture>& p_icon);
String get_button_text(int p_button) const;
+ String get_button_tooltip(int p_button) const;
Ref<Texture> get_button_icon(int p_button) const;
int get_selected() const;
@@ -100,6 +103,7 @@ public:
virtual Size2 get_minimum_size() const;
virtual void get_translatable_strings(List<String> *p_strings) const;
+ virtual String get_tooltip(const Point2& p_pos) const;
ButtonArray(Orientation p_orientation=HORIZONTAL);