MCPcopy Create free account
hub / github.com/RevoSucks/BM64Recomp / propagate_disabled

Method propagate_disabled

src/ui/elements/ui_element.cpp:129–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void Element::propagate_disabled(bool disabled) {
130 disabled_from_parent = disabled;
131
132 bool attribute_state = disabled_from_parent || !enabled;
133 if (disabled_attribute != attribute_state) {
134 disabled_attribute = attribute_state;
135 base->SetAttribute("disabled", attribute_state);
136
137 if (events_enabled & Events(EventType::Enable)) {
138 handle_event(Event::enable_event(!attribute_state));
139 }
140
141 for (auto &child : children) {
142 child->propagate_disabled(attribute_state);
143 }
144 }
145}
146
147void Element::handle_event(const Event& event) {
148 for (const auto& callback : callbacks) {

Callers

nothing calls this directly

Calls 1

EventsFunction · 0.85

Tested by

no test coverage detected