MCPcopy Create free account
hub / github.com/DISTRHO/DPF / onMouse

Function onMouse

examples/Meters/ExampleUIMeters.cpp:188–199  ·  view source on GitHub ↗

Mouse press event. This UI will change color when clicked. */

Source from the content-addressed store, hash-verified

186 This UI will change color when clicked.
187 */
188 bool onMouse(const MouseEvent& ev) override
189 {
190 // Test for left-clicked + pressed first.
191 if (ev.button != 1 || ! ev.press)
192 return false;
193
194 const int newColor(fColorValue == 0 ? 1 : 0);
195 updateColor(newColor);
196 setParameterValue(0, newColor);
197
198 return true;
199 }
200
201 // -------------------------------------------------------------------------------------------------------
202

Callers

nothing calls this directly

Calls 2

updateColorFunction · 0.85
setParameterValueFunction · 0.70

Tested by

no test coverage detected