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

Method appendContextMenu

src/MidiThing.cpp:404–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402 MidiThing* module;
403
404 void appendContextMenu(Menu* menu) override {
405
406 menu->addChild(new MenuSeparator());
407 std::string label = string::f("Voltage Mode Port %d", 3 * row + col + 1);
408
409 menu->addChild(createIndexSubmenuItem(label,
410 {"0 to 10v", "-5 to 5v", "0 to 8v", "0 to 5v"},
411 [ = ]() {
412 return module->getVoltageMode(row, col);
413 },
414 [ = ](int modeIdx) {
415 MidiThing::PORTMODE_t mode = (MidiThing::PORTMODE_t)(modeIdx + 1);
416 module->setVoltageModeOnHardware(row, col, mode);
417 }
418 ));
419
420 /*
421 menu->addChild(createIndexSubmenuItem("Get Port Info",
422 {"Full", "Port", "MIDI", "Voice"},
423 [ = ]() {
424 return -1;
425 },
426 [ = ](int mode) {
427 module->requestParamOverSysex(row, col, 2 * mode);
428 }
429 ));
430 */
431 }
432};
433
434// dervied from https://github.com/countmodula/VCVRackPlugins/blob/v2.0.0/src/components/CountModulaLEDDisplay.hpp

Callers

nothing calls this directly

Calls 2

getVoltageModeMethod · 0.80

Tested by

no test coverage detected