feat: Make gamepad status lighting optional (#1705)

* feat: Status Lighting option

* wip: rename to "Enable Controller LED"

* wip: setting for all four ports individually

* wip: fix detection + code cleanup

* wip: increase led speed for dusk preset

* wip: use aurora API

* bump aurora to 2b07d55

* wip: remove isSupported + fix namespace comment

* wip: add value override to BoolButton

* Style nit & remove unused

* Undo change

---------

Co-authored-by: Luke Street <luke@street.dev>
This commit is contained in:
Ash
2026-05-28 08:04:23 +02:00
committed by GitHub
parent 6592d95199
commit 71961dae85
8 changed files with 153 additions and 82 deletions
+8 -1
View File
@@ -12,7 +12,8 @@ BoolButton::BoolButton(Rml::Element* parent, Props props)
.icon = std::move(props.icon),
}),
mGetValue(std::move(props.getValue)), mSetValue(std::move(props.setValue)),
mIsDisabled(std::move(props.isDisabled)), mIsModified(std::move(props.isModified)) {}
mIsDisabled(std::move(props.isDisabled)), mIsModified(std::move(props.isModified)),
mValueOverride(std::move(props.valueOverride)) {}
bool BoolButton::modified() const {
if (mIsModified) {
@@ -29,6 +30,12 @@ bool BoolButton::disabled() const {
}
Rml::String BoolButton::format_value() {
if (mValueOverride) {
if (std::string value = mValueOverride(); !value.empty()) {
return value;
}
}
return mGetValue() ? "On" : "Off";
}