MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / onButton

Method onButton

plugins/Cardinal/src/HostMIDI-Map.cpp:569–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

567 }
568
569 void onButton(const ButtonEvent& e) override
570 {
571 DISTRHO_SAFE_ASSERT_RETURN(module != nullptr,);
572
573 e.stopPropagating();
574
575 if (e.action != GLFW_PRESS)
576 return;
577
578 switch (e.button)
579 {
580 case GLFW_MOUSE_BUTTON_RIGHT:
581 APP->scene->rack->touchedParam = lastTouchedParam = nullptr;
582 module->clearMap(id);
583 e.consume(this);
584 break;
585 case GLFW_MOUSE_BUTTON_LEFT:
586 APP->scene->rack->touchedParam = lastTouchedParam = nullptr;
587 module->enableLearn(id);
588 e.consume(this);
589 break;
590 }
591 }
592
593 /*
594 void onSelect(const SelectEvent& e) override

Callers

nothing calls this directly

Calls 2

enableLearnMethod · 0.80
clearMapMethod · 0.45

Tested by

no test coverage detected