aboutsummaryrefslogtreecommitdiff
path: root/src/gui/DropdownButton.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-02-22 13:31:51 +0100
committerdec05eba <dec05eba@protonmail.com>2025-02-22 13:31:51 +0100
commit189736c1a96a1ad0e571ad69f01039e96455011a (patch)
tree22e1a78f698209e2ce0ef462a5d281b5b3030897 /src/gui/DropdownButton.cpp
parent8003c209fea16cd164817306cb33d46ac61a44f0 (diff)
Add option to take a screenshot (default hotkey: alt+f1)
Diffstat (limited to 'src/gui/DropdownButton.cpp')
-rw-r--r--src/gui/DropdownButton.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/DropdownButton.cpp b/src/gui/DropdownButton.cpp
index 81bc015..bdc4027 100644
--- a/src/gui/DropdownButton.cpp
+++ b/src/gui/DropdownButton.cpp
@@ -201,6 +201,15 @@ namespace gsr {
}
}
+ void DropdownButton::set_item_description(const std::string &id, const std::string &new_description) {
+ for(auto &item : items) {
+ if(item.id == id) {
+ item.description_text.set_string(new_description);
+ return;
+ }
+ }
+ }
+
void DropdownButton::set_description(std::string description_text) {
description.set_string(std::move(description_text));
}