| 998 | } |
| 999 | |
| 1000 | void onAction(const ActionEvent& e) override { |
| 1001 | ui::Menu* menu = createMenu(); |
| 1002 | menu->cornerFlags = BND_CORNER_TOP; |
| 1003 | menu->box.pos = getAbsoluteOffset(math::Vec(0, box.size.y)); |
| 1004 | |
| 1005 | menu->addChild(createSubmenuItem("🌐 " + string::translate("MenuBar.help.language"), "", [=](ui::Menu* menu) { |
| 1006 | appendLanguageMenu(menu); |
| 1007 | })); |
| 1008 | |
| 1009 | menu->addChild(createMenuItem(string::translate("MenuBar.help.tips"), "", [=]() { |
| 1010 | APP->scene->addChild(tipWindowCreate()); |
| 1011 | })); |
| 1012 | |
| 1013 | menu->addChild(createMenuItem(string::translate("MenuBar.help.manual"), widget::getKeyCommandName(GLFW_KEY_F1, 0), [=]() { |
| 1014 | system::openBrowser("https://vcvrack.com/manual"); |
| 1015 | })); |
| 1016 | |
| 1017 | menu->addChild(createMenuItem(string::translate("MenuBar.help.support"), "", [=]() { |
| 1018 | system::openBrowser("https://vcvrack.com/support"); |
| 1019 | })); |
| 1020 | |
| 1021 | menu->addChild(createMenuItem("VCVRack.com", "", [=]() { |
| 1022 | system::openBrowser("https://vcvrack.com/"); |
| 1023 | })); |
| 1024 | |
| 1025 | menu->addChild(new ui::MenuSeparator); |
| 1026 | |
| 1027 | menu->addChild(createMenuItem(string::translate("MenuBar.help.userFolder"), "", [=]() { |
| 1028 | system::openDirectory(asset::user("")); |
| 1029 | })); |
| 1030 | |
| 1031 | menu->addChild(createMenuItem(string::translate("MenuBar.help.changelog"), "", [=]() { |
| 1032 | system::openBrowser("https://github.com/VCVRack/Rack/blob/v2/CHANGELOG.md"); |
| 1033 | })); |
| 1034 | |
| 1035 | if (library::isAppUpdateAvailable()) { |
| 1036 | menu->addChild(createMenuItem(string::f(string::translate("MenuBar.help.update"), APP_NAME), APP_VERSION + " → " + library::appVersion, [=]() { |
| 1037 | system::openBrowser(library::appDownloadUrl); |
| 1038 | })); |
| 1039 | } |
| 1040 | else if (!settings::autoCheckUpdates && !settings::devMode) { |
| 1041 | menu->addChild(createMenuItem(string::f(string::translate("MenuBar.help.checkUpdate"), APP_NAME), "", [=]() { |
| 1042 | std::thread t([&]() { |
| 1043 | library::checkAppUpdate(); |
| 1044 | }); |
| 1045 | t.detach(); |
| 1046 | }, false, true)); |
| 1047 | } |
| 1048 | } |
| 1049 | |
| 1050 | void step() override { |
| 1051 | notification->box.pos = math::Vec(0, 0); |
nothing calls this directly
no test coverage detected