FastLED 3.9.15
Loading...
Searching...
No Matches

◆ onChanged()

void fl::UICheckbox::onChanged ( function< void(bool)> callback)
inline

Definition at line 190 of file ui.h.

190 {
191 function<void(UICheckbox &, bool)> wrapped_cb =
192 [callback](UICheckbox &checkbox, bool value) {
193 FASTLED_UNUSED(checkbox);
194 callback(value);
195 };
196 mCallbacks.add(wrapped_cb);
197 mListener.addToEngineEventsOnce();
198 }
Listener mListener
Definition ui.h:235
FunctionList< UICheckbox &, bool > mCallbacks
Definition ui.h:232
UICheckbox(const char *name, bool value=false)
Definition ui.h:179
bool value() const
Definition ui_impl.h:132
#define FASTLED_UNUSED(x)
Definition unused.h:3