mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-03-31 09:17:04 +09:00
Add dropdown icons and description text
This commit is contained in:
@@ -17,8 +17,9 @@ namespace gsr {
|
||||
bool on_event(mgl::Event &event, mgl::Window &window, mgl::vec2f offset) override;
|
||||
void draw(mgl::Window &window, mgl::vec2f offset) override;
|
||||
|
||||
void add_item(const std::string &text, const std::string &id);
|
||||
void add_item(const std::string &text, const std::string &id, const std::string &description = "");
|
||||
void set_item_label(const std::string &id, const std::string &new_label);
|
||||
void set_item_icon(const std::string &id, mgl::Texture *texture);
|
||||
|
||||
void set_activated(bool activated);
|
||||
|
||||
@@ -30,6 +31,8 @@ namespace gsr {
|
||||
private:
|
||||
struct Item {
|
||||
mgl::Text text;
|
||||
mgl::Text description_text;
|
||||
mgl::Texture *icon_texture = nullptr;
|
||||
std::string id;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user