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

Method onAction

src/override/MenuBar.cpp:837–861  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835
836struct HelpButton : MenuButton {
837 void onAction(const ActionEvent& e) override {
838 ui::Menu* menu = createMenu();
839 menu->cornerFlags = BND_CORNER_TOP;
840 menu->box.pos = getAbsoluteOffset(math::Vec(0, box.size.y));
841
842 menu->addChild(createMenuItem("Rack User manual", "F1", [=]() {
843 patchUtils::openBrowser("https://vcvrack.com/manual");
844 }));
845
846 menu->addChild(createMenuItem("Cardinal project page", "", [=]() {
847 patchUtils::openBrowser("https://github.com/DISTRHO/Cardinal/");
848 }));
849
850 menu->addChild(new ui::MenuSeparator);
851
852#ifndef DISTRHO_OS_WASM
853 menu->addChild(createMenuItem("Open user folder", "", [=]() {
854 system::openDirectory(asset::user(""));
855 }));
856
857 menu->addChild(new ui::MenuSeparator);
858#endif
859
860 menu->addChild(createMenuLabel("Rack " + APP_VERSION + " Compatible"));
861 }
862};
863
864

Callers

nothing calls this directly

Calls 7

createMenuFunction · 0.85
VecClass · 0.85
createMenuItemFunction · 0.85
userFunction · 0.85
createMenuLabelFunction · 0.85
addChildMethod · 0.80
openBrowserFunction · 0.50

Tested by

no test coverage detected