diff options
author | Stijn Buys <ingar@telenet.be> | 2020-07-18 14:49:13 +0200 |
---|---|---|
committer | Stijn Buys <ingar@telenet.be> | 2020-07-18 14:49:13 +0200 |
commit | b19afea9427dde861c990236ab11e23edfeb267c (patch) | |
tree | 6f87e57196649ebe8ba6e2945a82f48bcee1c3d1 /src/ui/widget.h | |
parent | 094ac735e16ad94c12bc1d866253f1c1d84a9af6 (diff) |
Completed ui library tooltip implementation.
Diffstat (limited to 'src/ui/widget.h')
-rw-r--r-- | src/ui/widget.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ui/widget.h b/src/ui/widget.h index 243fdda..e1f199d 100644 --- a/src/ui/widget.h +++ b/src/ui/widget.h @@ -23,6 +23,8 @@ namespace ui { +class Tooltip; + class Widget { @@ -131,7 +133,7 @@ public: } /// widget tooltip - inline const std::string &tooltip() const { + inline Tooltip *tooltip() { return widget_tooltip; } @@ -249,11 +251,11 @@ public: /// set the widget's label void set_label(const char *label = nullptr); - /// set the wdiget's widget_tooltip - void set_tooltip(const std::string &tooltip); + /// set the wdiget's tooltip text + void set_tooltip(const std::string &tooltip_text); - /// set the wdiget's widget_tooltip - void set_tooltip(const char *tooltip = nullptr); + /// set the wdiget's tooltip text + void set_tooltip(const char *tooltip_text = nullptr); /// enable or disable widget border void set_border(const bool border = true); @@ -446,13 +448,14 @@ private: math::Vector2f widget_location; math::Vector2f widget_size; std::string widget_label; - std::string widget_tooltip; Children widget_children; const Palette *widget_palette; const Font *widget_font; Widget *widget_parent; + + Tooltip *widget_tooltip; Children::iterator find_child(Widget *child); |