MCPcopy Create free account
hub / github.com/VCVRack/Rack / onButton

Method onButton

src/core/MIDIMap.cpp:311–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309 }
310
311 void onButton(const ButtonEvent& e) override {
312 e.stopPropagating();
313 if (!module)
314 return;
315
316 if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_LEFT) {
317 e.consume(this);
318 }
319
320 if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_RIGHT) {
321 module->clearMap(id);
322 e.consume(this);
323 }
324 }
325
326 void onSelect(const SelectEvent& e) override {
327 if (!module)

Callers

nothing calls this directly

Calls 3

stopPropagatingMethod · 0.80
consumeMethod · 0.80
clearMapMethod · 0.80

Tested by

no test coverage detected