From 4ea5ada9050d22fcb7eed67a72358bce11c9b3df Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 10 Aug 2024 00:45:36 +0200 Subject: Settings page save settings, refactor --- include/gui/List.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/gui/List.hpp') diff --git a/include/gui/List.hpp b/include/gui/List.hpp index 0b1350c..426a66e 100644 --- a/include/gui/List.hpp +++ b/include/gui/List.hpp @@ -27,8 +27,14 @@ namespace gsr { //void remove_child_widget(Widget *widget) override; + // Might not take effect immediately but at the next draw iteration if inside an event loop void add_widget(std::unique_ptr widget); + // Might not take effect immediately but at the next draw iteration if inside an event loop void remove_widget(Widget *widget); + // Excludes widgets from queue + const std::vector>& get_child_widgets() const; + // Returns nullptr if index is invalid + Widget* get_child_widget_by_index(size_t index) const; mgl::vec2f get_size() override; private: @@ -40,5 +46,6 @@ namespace gsr { std::vector remove_queue; Orientation orientation; Alignment content_alignment; + bool inside_event_handler = false; }; } \ No newline at end of file -- cgit v1.2.3