From 5d6d57b8810a6ef88fb5e155d4610345f7df288d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 15 Sep 2024 02:49:28 +0200 Subject: Hide notifications in simple view, draw combobox upward if no space in scissor region to fully draw box --- include/gui/ComboBox.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/gui') 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 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; -- cgit v1.2.3