diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-08-02 23:38:23 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-08-02 23:53:28 +0200 |
commit | 2869ef7cec7de6bc744cdba9e753dbd0df4ab65b (patch) | |
tree | 1d15c5679197b38d42cabb3e74143ef63a930d84 /include/gui/Widget.hpp | |
parent | 7c4af06d953ad439906f85ec996ad00dd38d2302 (diff) |
Add widgets for settings page, add list to auto position widgets
Diffstat (limited to 'include/gui/Widget.hpp')
-rw-r--r-- | include/gui/Widget.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/gui/Widget.hpp b/include/gui/Widget.hpp index bd0d5d9..1d52033 100644 --- a/include/gui/Widget.hpp +++ b/include/gui/Widget.hpp @@ -11,6 +11,8 @@ namespace gsr { class Widget { friend class StaticPage; friend class ScrollablePage; + friend class List; + friend class Page; public: Widget(); Widget(const Widget&) = delete; @@ -23,8 +25,13 @@ namespace gsr { virtual void set_position(mgl::vec2f position); virtual mgl::vec2f get_position() const; + virtual mgl::vec2f get_size() = 0; + protected: + void set_widget_as_selected_in_parent(); + void remove_widget_as_selected_in_parent(); protected: mgl::vec2f position; - bool move_to_top = false; + Widget *parent_widget = nullptr; + Widget *selected_child_widget = nullptr; }; }
\ No newline at end of file |