UI: Implement controller config

Resolves #622
This commit is contained in:
Luke Street
2026-05-03 17:16:15 -06:00
parent 742f4938f2
commit 924dbc7715
10 changed files with 737 additions and 17 deletions
+12
View File
@@ -51,6 +51,18 @@ void SelectButton::set_value_label(const Rml::String& value) {
}
}
SelectButton& SelectButton::on_pressed(SelectButtonCallback callback) {
if (!callback) {
return *this;
}
listen(Rml::EventId::Submit, [this, callback = std::move(callback)](Rml::Event& event) {
if (!disabled() && event.GetTargetElement() == mRoot) {
callback();
}
});
return *this;
}
void SelectButton::update_props(Props props) {
if (mProps.key != props.key) {
mKeyElem->SetInnerRML(escape(props.key));