Hide notifications in simple view, draw combobox upward if no space in scissor region to fully draw box

This commit is contained in:
dec05eba
2024-09-15 02:49:28 +02:00
parent ce78dd5b36
commit 5d6d57b881
5 changed files with 104 additions and 82 deletions

View File

@@ -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;