aboutsummaryrefslogtreecommitdiff
path: root/src/gui/RadioButton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/RadioButton.cpp')
-rw-r--r--src/gui/RadioButton.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/RadioButton.cpp b/src/gui/RadioButton.cpp
index a6ef96a..bbb958a 100644
--- a/src/gui/RadioButton.cpp
+++ b/src/gui/RadioButton.cpp
@@ -169,7 +169,7 @@ namespace gsr {
}
}
- const std::string RadioButton::get_selected_id() const {
+ const std::string& RadioButton::get_selected_id() const {
if(items.empty()) {
static std::string dummy;
return dummy;
@@ -177,4 +177,13 @@ namespace gsr {
return items[selected_item].id;
}
}
+
+ const std::string& RadioButton::get_selected_text() const {
+ if(items.empty()) {
+ static std::string dummy;
+ return dummy;
+ } else {
+ return items[selected_item].text.get_string();
+ }
+ }
} \ No newline at end of file