MCPcopy Create free account
hub / github.com/FastLED/FastLED / onClicked

Method onClicked

src/fl/ui/button.h:84–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83
84 int onClicked(function<void()> callback) FL_NOEXCEPT {
85 int id = mCallbacks.add([callback](UIButton &btn) {
86 if (btn.clicked()) {
87 callback();
88 }
89 });
90 mListener.addToEngineEventsOnce();
91 return id;
92 }
93
94 int onPressed(function<void()> callback) FL_NOEXCEPT {
95 int id = mPressCallbacks.add(callback);

Callers 1

setupUiCallbacksFunction · 0.80

Calls 3

addMethod · 0.45
clickedMethod · 0.45
addToEngineEventsOnceMethod · 0.45

Tested by

no test coverage detected