MCPcopy Create free account
hub / github.com/VCVRack/Befaco / onDragStart

Method onDragStart

src/Bypass.cpp:212–221  ·  view source on GitHub ↗

Instead of using onAction() which is called on mouse up, handle on mouse down

Source from the content-addressed store, hash-verified

210struct RecordButton : LightButton<VCVBezelBig, VCVBezelLightBig<RedLight>> {
211 // Instead of using onAction() which is called on mouse up, handle on mouse down
212 void onDragStart(const event::DragStart& e) override {
213 Bypass* module = dynamic_cast<Bypass*>(this->module);
214 if (e.button == GLFW_MOUSE_BUTTON_LEFT) {
215 if (module) {
216 module->launchButtonHeld = true;
217 }
218 }
219
220 LightButton::onDragStart(e);
221 }
222
223 void onDragEnd(const event::DragEnd& e) override {
224 Bypass* module = dynamic_cast<Bypass*>(this->module);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected