diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-09-15 02:49:28 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-09-15 02:49:28 +0200 |
commit | 5d6d57b8810a6ef88fb5e155d4610345f7df288d (patch) | |
tree | 013cf85abc7d247075acd372e19dd060705c9435 /include/gui | |
parent | ce78dd5b363ec1feb2e937601daf09977bf44648 (diff) |
Hide notifications in simple view, draw combobox upward if no space in scissor region to fully draw box
Diffstat (limited to 'include/gui')
-rw-r--r-- | include/gui/ComboBox.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/gui/ComboBox.hpp b/include/gui/ComboBox.hpp index 96489e6..1f40371 100644 --- a/include/gui/ComboBox.hpp +++ b/include/gui/ComboBox.hpp @@ -26,12 +26,16 @@ namespace gsr { std::function<void(const std::string &text, const std::string &id)> on_selection_changed; private: + void draw_selected(mgl::Window &window, mgl::vec2f draw_pos); + void draw_unselected(mgl::Window &window, mgl::vec2f draw_pos); + void draw_item_outline(mgl::Window &window, mgl::vec2f pos, mgl::vec2f size); void update_if_dirty(); float get_dropdown_arrow_height() const; private: struct Item { mgl::Text text; std::string id; + mgl::vec2f position; }; mgl::vec2f max_size; |