Mod API: UI service (#2189)

This commit is contained in:
Luke Street
2026-07-09 10:31:34 -06:00
committed by GitHub
parent f3ca94b338
commit 6849baac06
33 changed files with 2385 additions and 66 deletions
+16 -1
View File
@@ -141,6 +141,21 @@ void BaseStringButton::stop_editing(bool commit, bool refocusRoot) {
StringButton::StringButton(Rml::Element* parent, Props props)
: BaseStringButton(parent, {.key = std::move(props.key), .maxLength = props.maxLength}),
mGetValue(std::move(props.getValue)), mSetValue(std::move(props.setValue)) {}
mGetValue(std::move(props.getValue)), mSetValue(std::move(props.setValue)),
mIsDisabled(std::move(props.isDisabled)), mIsModified(std::move(props.isModified)) {}
bool StringButton::modified() const {
if (mIsModified) {
return mIsModified();
}
return BaseStringButton::modified();
}
bool StringButton::disabled() const {
if (mIsDisabled) {
return mIsDisabled();
}
return BaseStringButton::disabled();
}
} // namespace dusk::ui