mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp
synced 2026-06-12 21:45:37 -04:00
Mod menu progress.
This commit is contained in:
@@ -52,11 +52,13 @@ void Element::add_child(Element *child) {
|
||||
void Element::set_property(Rml::PropertyId property_id, const Rml::Property &property, Animation animation) {
|
||||
assert(base != nullptr);
|
||||
|
||||
if (animation.type == AnimationType::None) {
|
||||
if (animation.type == AnimationType::None || animation.type == AnimationType::Set) {
|
||||
base->SetProperty(property_id, property);
|
||||
|
||||
// Only non-animated properties should be stored as part of the style.
|
||||
Style::set_property(property_id, property, animation);
|
||||
if (animation.type == AnimationType::None) {
|
||||
// Only non-animated properties should be stored as part of the style.
|
||||
Style::set_property(property_id, property, animation);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const Rml::String property_name = Rml::StyleSheetSpecification::GetPropertyName(property_id);
|
||||
@@ -184,6 +186,10 @@ void Element::set_enabled(bool enabled) {
|
||||
propagate_disabled(disabled_from_parent);
|
||||
}
|
||||
|
||||
bool Element::is_enabled() const {
|
||||
return enabled && !disabled_from_parent;
|
||||
}
|
||||
|
||||
void Element::set_text(const std::string &text) {
|
||||
base->SetInnerRML(text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user