|
|
|
@@ -1,5 +1,5 @@ |
|
|
|
--- ../Rack/src/app/MenuBar.cpp 2023-05-20 17:03:33.005081737 +0200 |
|
|
|
+++ MenuBar.cpp 2023-05-20 19:32:57.019576570 +0200 |
|
|
|
--- ../Rack/src/app/MenuBar.cpp 2023-06-11 21:02:02.640002965 +0200 |
|
|
|
+++ MenuBar.cpp 2023-07-11 19:18:16.204016531 +0200 |
|
|
|
@@ -1,8 +1,33 @@ |
|
|
|
+/* |
|
|
|
+ * DISTRHO Cardinal Plugin |
|
|
|
@@ -44,7 +44,7 @@ |
|
|
|
#include <window/Window.hpp> |
|
|
|
#include <asset.hpp> |
|
|
|
#include <context.hpp> |
|
|
|
@@ -25,8 +51,26 @@ |
|
|
|
@@ -25,8 +51,28 @@ |
|
|
|
#include <patch.hpp> |
|
|
|
#include <library.hpp> |
|
|
|
|
|
|
|
@@ -53,6 +53,11 @@ |
|
|
|
+#include "DistrhoPlugin.hpp" |
|
|
|
+#include "DistrhoStandaloneUtils.hpp" |
|
|
|
+ |
|
|
|
+#ifdef DISTRHO_OS_WASM |
|
|
|
+# include <emscripten/emscripten.h> |
|
|
|
+# undef HAVE_LIBLO |
|
|
|
+#endif |
|
|
|
+ |
|
|
|
+#ifdef HAVE_LIBLO |
|
|
|
+# include <lo/lo.h> |
|
|
|
+#endif |
|
|
|
@@ -64,14 +69,11 @@ |
|
|
|
+namespace engine { |
|
|
|
+void Engine_setRemoteDetails(Engine*, remoteUtils::RemoteDetails*); |
|
|
|
+} |
|
|
|
+namespace plugin { |
|
|
|
+void updateStaticPluginsDarkMode(); |
|
|
|
+} |
|
|
|
+ |
|
|
|
namespace app { |
|
|
|
namespace menuBar { |
|
|
|
|
|
|
|
@@ -48,79 +92,180 @@ |
|
|
|
@@ -48,79 +94,238 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
@@ -97,6 +99,32 @@ |
|
|
|
+ const bool isStandalone; |
|
|
|
+ std::vector<std::string> demoPatches; |
|
|
|
+ |
|
|
|
+#ifdef DISTRHO_OS_WASM |
|
|
|
+ static void WebBrowserDataSaved(const int err) |
|
|
|
+ { |
|
|
|
+ err ? async_dialog_message("Error, could not save web browser data!") |
|
|
|
+ : async_dialog_message("Web browser data saved!"); |
|
|
|
+ } |
|
|
|
+ |
|
|
|
+ static void wasmSaveAs() |
|
|
|
+ { |
|
|
|
+ async_dialog_text_input("Filename", nullptr, [](char* const filename) { |
|
|
|
+ if (filename == nullptr) |
|
|
|
+ return; |
|
|
|
+ |
|
|
|
+ APP->patch->path = asset::user("patches"); |
|
|
|
+ system::createDirectories(APP->patch->path); |
|
|
|
+ |
|
|
|
+ APP->patch->path += filename; |
|
|
|
+ if (rack::system::getExtension(filename) != ".vcv") |
|
|
|
+ APP->patch->path += ".vcv"; |
|
|
|
+ |
|
|
|
+ patchUtils::saveDialog(APP->patch->path); |
|
|
|
+ std::free(filename); |
|
|
|
+ }); |
|
|
|
+ } |
|
|
|
+#endif |
|
|
|
+ |
|
|
|
+ FileButton(const bool standalone) |
|
|
|
+ : MenuButton(), isStandalone(standalone) |
|
|
|
+ { |
|
|
|
@@ -122,6 +150,11 @@ |
|
|
|
|
|
|
|
- menu->addChild(createMenuItem("New", RACK_MOD_CTRL_NAME "+N", []() { |
|
|
|
- APP->patch->loadTemplateDialog(); |
|
|
|
- })); |
|
|
|
- |
|
|
|
- menu->addChild(createMenuItem("Open", RACK_MOD_CTRL_NAME "+O", []() { |
|
|
|
- APP->patch->loadDialog(); |
|
|
|
- })); |
|
|
|
+#ifndef DISTRHO_OS_WASM |
|
|
|
+ constexpr const char* const NewShortcut = RACK_MOD_CTRL_NAME "+N"; |
|
|
|
+#else |
|
|
|
@@ -132,16 +165,29 @@ |
|
|
|
+ })); |
|
|
|
+ |
|
|
|
+#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS |
|
|
|
+#ifndef DISTRHO_OS_WASM |
|
|
|
+ menu->addChild(createMenuItem("New (factory template)", "", []() { |
|
|
|
+ patchUtils::loadTemplateDialog(true); |
|
|
|
})); |
|
|
|
|
|
|
|
- menu->addChild(createMenuItem("Open", RACK_MOD_CTRL_NAME "+O", []() { |
|
|
|
- APP->patch->loadDialog(); |
|
|
|
+ menu->addChild(createMenuItem("Open / Import...", RACK_MOD_CTRL_NAME "+O", []() { |
|
|
|
+ })); |
|
|
|
+ |
|
|
|
+#ifndef DISTRHO_OS_WASM |
|
|
|
+ constexpr const char* const OpenName = "Open..."; |
|
|
|
+#else |
|
|
|
+ constexpr const char* const OpenName = "Import patch..."; |
|
|
|
+#endif |
|
|
|
+ menu->addChild(createMenuItem(OpenName, RACK_MOD_CTRL_NAME "+O", []() { |
|
|
|
+ patchUtils::loadDialog(); |
|
|
|
})); |
|
|
|
+ })); |
|
|
|
+ |
|
|
|
+ const std::string patchesDir = asset::user("patches"); |
|
|
|
+ const std::vector<std::string> patches = system::isDirectory(patchesDir) ? system::getEntries(patchesDir) : std::vector<std::string>(); |
|
|
|
+ menu->addChild(createSubmenuItem("Open local patch", "", [patches](ui::Menu* menu) { |
|
|
|
+ for (const std::string& path : patches) { |
|
|
|
+ std::string name = system::getStem(path); |
|
|
|
+ menu->addChild(createMenuItem(name, "", [=]() { |
|
|
|
+ patchUtils::loadPathDialog(path, false); |
|
|
|
+ })); |
|
|
|
+ } |
|
|
|
+ }, patches.empty())); |
|
|
|
|
|
|
|
menu->addChild(createSubmenuItem("Open recent", "", [](ui::Menu* menu) { |
|
|
|
for (const std::string& path : settings::recentPatchPaths) { |
|
|
|
@@ -152,50 +198,104 @@ |
|
|
|
})); |
|
|
|
} |
|
|
|
}, settings::recentPatchPaths.empty())); |
|
|
|
+#endif |
|
|
|
+ |
|
|
|
+ if (!demoPatches.empty()) |
|
|
|
+ { |
|
|
|
+ menu->addChild(createSubmenuItem("Open demo / example project", "", [=](ui::Menu* const menu) { |
|
|
|
+ for (std::string path : demoPatches) { |
|
|
|
+ std::string label = system::getStem(path); |
|
|
|
+ |
|
|
|
+ for (size_t i=0, len=label.size(); i<len; ++i) { |
|
|
|
+ if (label[i] == '_') |
|
|
|
+ label[i] = ' '; |
|
|
|
+ } |
|
|
|
+ |
|
|
|
+ menu->addChild(createMenuItem(label, "", [path]() { |
|
|
|
+ patchUtils::loadPathDialog(path, true); |
|
|
|
+ })); |
|
|
|
+ } |
|
|
|
+ |
|
|
|
+ menu->addChild(new ui::MenuSeparator); |
|
|
|
|
|
|
|
+ menu->addChild(createMenuItem("Open patchstorage.com for more patches", "", []() { |
|
|
|
+ patchUtils::openBrowser("https://patchstorage.com/platform/cardinal/"); |
|
|
|
+ })); |
|
|
|
+ })); |
|
|
|
+ } |
|
|
|
+ |
|
|
|
+#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS |
|
|
|
+ menu->addChild(createMenuItem("Import selection...", "", [=]() { |
|
|
|
+ patchUtils::loadSelectionDialog(); |
|
|
|
+ }, false, true)); |
|
|
|
+ |
|
|
|
+ menu->addChild(new ui::MenuSeparator); |
|
|
|
+ |
|
|
|
+#ifndef DISTRHO_OS_WASM |
|
|
|
menu->addChild(createMenuItem("Save", RACK_MOD_CTRL_NAME "+S", []() { |
|
|
|
- APP->patch->saveDialog(); |
|
|
|
+ // NOTE: will do nothing if path is empty, intentionally |
|
|
|
+ // NOTE: for plugin versions it will do nothing if path is empty, intentionally |
|
|
|
+ patchUtils::saveDialog(APP->patch->path); |
|
|
|
+ }, APP->patch->path.empty())); |
|
|
|
+ }, APP->patch->path.empty() && !isStandalone)); |
|
|
|
+ |
|
|
|
+ menu->addChild(createMenuItem("Save as / Export...", RACK_MOD_CTRL_NAME "+Shift+S", []() { |
|
|
|
+ patchUtils::saveAsDialog(); |
|
|
|
+ })); |
|
|
|
+#else |
|
|
|
+ menu->addChild(createMenuItem("Import patch...", RACK_MOD_CTRL_NAME "+O", []() { |
|
|
|
+ patchUtils::loadDialog(); |
|
|
|
+ menu->addChild(createMenuItem("Save", "", []() { |
|
|
|
+ if (APP->patch->path.empty()) |
|
|
|
+ wasmSaveAs(); |
|
|
|
+ else |
|
|
|
+ patchUtils::saveDialog(APP->patch->path); |
|
|
|
})); |
|
|
|
|
|
|
|
- menu->addChild(createMenuItem("Save as", RACK_MOD_CTRL_NAME "+Shift+S", []() { |
|
|
|
- APP->patch->saveAsDialog(); |
|
|
|
+ menu->addChild(createMenuItem("Import selection...", "", [=]() { |
|
|
|
+ patchUtils::loadSelectionDialog(); |
|
|
|
+ }, false, true)); |
|
|
|
+ |
|
|
|
+ menu->addChild(createMenuItem("Save and download compressed", RACK_MOD_CTRL_NAME "+Shift+S", []() { |
|
|
|
+ patchUtils::saveAsDialog(); |
|
|
|
+ menu->addChild(createMenuItem("Save as...", "", []() { |
|
|
|
+ wasmSaveAs(); |
|
|
|
})); |
|
|
|
|
|
|
|
- menu->addChild(createMenuItem("Save a copy", "", []() { |
|
|
|
- APP->patch->saveAsDialog(false); |
|
|
|
+ menu->addChild(createMenuItem("Save and download compressed", "", []() { |
|
|
|
+ patchUtils::saveAsDialog(); |
|
|
|
})); |
|
|
|
|
|
|
|
+ menu->addChild(createMenuItem("Save and download uncompressed", "", []() { |
|
|
|
+ patchUtils::saveAsDialogUncompressed(); |
|
|
|
})); |
|
|
|
+ })); |
|
|
|
+#endif |
|
|
|
+#endif |
|
|
|
|
|
|
|
+ |
|
|
|
menu->addChild(createMenuItem("Revert", RACK_MOD_CTRL_NAME "+" RACK_MOD_SHIFT_NAME "+O", []() { |
|
|
|
- APP->patch->revertDialog(); |
|
|
|
- }, APP->patch->path == "")); |
|
|
|
+ patchUtils::revertDialog(); |
|
|
|
+ }, APP->patch->path.empty())); |
|
|
|
|
|
|
|
+#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS |
|
|
|
menu->addChild(createMenuItem("Overwrite template", "", []() { |
|
|
|
- APP->patch->saveTemplateDialog(); |
|
|
|
+ patchUtils::saveTemplateDialog(); |
|
|
|
})); |
|
|
|
|
|
|
|
+#ifdef DISTRHO_OS_WASM |
|
|
|
menu->addChild(new ui::MenuSeparator); |
|
|
|
|
|
|
|
- // Load selection |
|
|
|
- menu->addChild(createMenuItem("Import selection", "", [=]() { |
|
|
|
- APP->scene->rack->loadSelectionDialog(); |
|
|
|
- }, false, true)); |
|
|
|
- |
|
|
|
+ menu->addChild(createMenuItem("Save persistent browser data", "", []() { |
|
|
|
+ settings::save(); |
|
|
|
+ EM_ASM({ |
|
|
|
+ Module.FS.syncfs(false, function(err){ dynCall('vi', $0, [!!err]) }); |
|
|
|
+ }, WebBrowserDataSaved); |
|
|
|
+ })); |
|
|
|
+#endif |
|
|
|
+#endif |
|
|
|
+ |
|
|
|
+#if defined(HAVE_LIBLO) || ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS |
|
|
|
+#ifdef __MOD_DEVICES__ |
|
|
|
+#define REMOTE_NAME "MOD" |
|
|
|
@@ -204,17 +304,16 @@ |
|
|
|
+#endif |
|
|
|
menu->addChild(new ui::MenuSeparator); |
|
|
|
|
|
|
|
- // Load selection |
|
|
|
- menu->addChild(createMenuItem("Import selection", "", [=]() { |
|
|
|
- APP->scene->rack->loadSelectionDialog(); |
|
|
|
- }, false, true)); |
|
|
|
- menu->addChild(createMenuItem("Quit", RACK_MOD_CTRL_NAME "+Q", []() { |
|
|
|
- APP->window->close(); |
|
|
|
- })); |
|
|
|
+ remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote(); |
|
|
|
+ |
|
|
|
+ if (remoteDetails != nullptr && remoteDetails->connected) { |
|
|
|
+ menu->addChild(createMenuItem("Deploy to " REMOTE_NAME, "F7", [remoteDetails]() { |
|
|
|
+ remoteUtils::sendFullPatchToRemote(remoteDetails); |
|
|
|
+ })); |
|
|
|
|
|
|
|
+ |
|
|
|
+ menu->addChild(createCheckMenuItem("Auto deploy to " REMOTE_NAME, "", |
|
|
|
+ [remoteDetails]() {return remoteDetails->autoDeploy;}, |
|
|
|
+ [remoteDetails]() { |
|
|
|
@@ -222,55 +321,21 @@ |
|
|
|
+ Engine_setRemoteDetails(APP->engine, remoteDetails->autoDeploy ? remoteDetails : nullptr); |
|
|
|
+ } |
|
|
|
+ )); |
|
|
|
+#ifndef __MOD_DEVICES__ |
|
|
|
+ } else { |
|
|
|
+ menu->addChild(createMenuItem("Connect to " REMOTE_NAME, "", []() { |
|
|
|
+ DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote()); |
|
|
|
+ })); |
|
|
|
+ } |
|
|
|
+#endif |
|
|
|
+ |
|
|
|
+#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS |
|
|
|
+#ifndef DISTRHO_OS_WASM |
|
|
|
menu->addChild(new ui::MenuSeparator); |
|
|
|
|
|
|
|
- menu->addChild(createMenuItem("Quit", RACK_MOD_CTRL_NAME "+Q", []() { |
|
|
|
- APP->window->close(); |
|
|
|
+ // Load selection |
|
|
|
+ menu->addChild(createMenuItem("Import selection...", "", [=]() { |
|
|
|
+ patchUtils::loadSelectionDialog(); |
|
|
|
+ }, false, true)); |
|
|
|
+ |
|
|
|
+ menu->addChild(createMenuItem("Export uncompressed json...", "", []() { |
|
|
|
+ patchUtils::saveAsDialogUncompressed(); |
|
|
|
})); |
|
|
|
+#endif |
|
|
|
+#endif |
|
|
|
+ |
|
|
|
+ if (!demoPatches.empty()) |
|
|
|
+ { |
|
|
|
+ menu->addChild(new ui::MenuSeparator); |
|
|
|
+ |
|
|
|
+ menu->addChild(createSubmenuItem("Open Demo / Example project", "", [=](ui::Menu* const menu) { |
|
|
|
+ for (std::string path : demoPatches) { |
|
|
|
+ std::string label = system::getStem(path); |
|
|
|
+ |
|
|
|
+ for (size_t i=0, len=label.size(); i<len; ++i) { |
|
|
|
+ if (label[i] == '_') |
|
|
|
+ label[i] = ' '; |
|
|
|
+ } |
|
|
|
+ menu->addChild(createMenuItem("Connect to " REMOTE_NAME "...", "", [remoteDetails]() { |
|
|
|
+ const std::string url = remoteDetails != nullptr ? remoteDetails->url : CARDINAL_DEFAULT_REMOTE_URL; |
|
|
|
+ async_dialog_text_input("Remote:", url.c_str(), [](char* const url) { |
|
|
|
+ if (url == nullptr) |
|
|
|
+ return; |
|
|
|
+ |
|
|
|
+ menu->addChild(createMenuItem(label, "", [path]() { |
|
|
|
+ patchUtils::loadPathDialog(path, true); |
|
|
|
+ })); |
|
|
|
+ } |
|
|
|
+ |
|
|
|
+ menu->addChild(new ui::MenuSeparator); |
|
|
|
+ |
|
|
|
+ menu->addChild(createMenuItem("Open PatchStorage.com for more patches", "", []() { |
|
|
|
+ patchUtils::openBrowser("https://patchstorage.com/platform/cardinal/"); |
|
|
|
+ })); |
|
|
|
+ DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote(url)); |
|
|
|
+ std::free(url); |
|
|
|
+ }); |
|
|
|
+ })); |
|
|
|
+#endif |
|
|
|
+ } |
|
|
|
+#endif |
|
|
|
+ |
|
|
|
+#ifndef DISTRHO_OS_WASM |
|
|
|
+ if (isStandalone) { |
|
|
|
@@ -284,7 +349,7 @@ |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
@@ -166,7 +311,7 @@ |
|
|
|
@@ -166,7 +371,7 @@ |
|
|
|
|
|
|
|
menu->addChild(new ui::MenuSeparator); |
|
|
|
|
|
|
|
@@ -293,7 +358,7 @@ |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
@@ -256,7 +401,7 @@ |
|
|
|
@@ -256,7 +461,7 @@ |
|
|
|
return settings::cableTension; |
|
|
|
} |
|
|
|
float getDefaultValue() override { |
|
|
|
@@ -302,10 +367,11 @@ |
|
|
|
} |
|
|
|
float getDisplayValue() override { |
|
|
|
return getValue() * 100; |
|
|
|
@@ -393,49 +538,36 @@ |
|
|
|
@@ -393,49 +598,39 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
+#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS |
|
|
|
+static void setAllFramebufferWidgetsDirty(widget::Widget* const widget) |
|
|
|
+{ |
|
|
|
+ for (widget::Widget* child : widget->children) |
|
|
|
@@ -318,6 +384,7 @@ |
|
|
|
+ setAllFramebufferWidgetsDirty(child); |
|
|
|
+ } |
|
|
|
+} |
|
|
|
+#endif |
|
|
|
+ |
|
|
|
+ |
|
|
|
struct ViewButton : MenuButton { |
|
|
|
@@ -363,18 +430,19 @@ |
|
|
|
- ui::refreshTheme(); |
|
|
|
- } |
|
|
|
- )); |
|
|
|
+#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS |
|
|
|
+ std::string darkModeText; |
|
|
|
+ if (settings::darkMode) |
|
|
|
+ darkModeText = CHECKMARK_STRING; |
|
|
|
+ menu->addChild(createMenuItem("Dark Mode", darkModeText, []() { |
|
|
|
+ switchDarkMode(!settings::darkMode); |
|
|
|
+ plugin::updateStaticPluginsDarkMode(); |
|
|
|
+ setAllFramebufferWidgetsDirty(APP->scene); |
|
|
|
+ })); |
|
|
|
+#endif |
|
|
|
|
|
|
|
menu->addChild(createBoolPtrMenuItem("Show tooltips", "", &settings::tooltips)); |
|
|
|
|
|
|
|
@@ -460,9 +592,18 @@ |
|
|
|
@@ -460,9 +655,18 @@ |
|
|
|
menu->addChild(haloBrightnessSlider); |
|
|
|
|
|
|
|
menu->addChild(new ui::MenuSeparator); |
|
|
|
@@ -393,7 +461,7 @@ |
|
|
|
|
|
|
|
static const std::vector<std::string> knobModeLabels = { |
|
|
|
"Linear", |
|
|
|
@@ -487,11 +628,34 @@ |
|
|
|
@@ -487,11 +691,34 @@ |
|
|
|
menu->addChild(knobScrollSensitivitySlider); |
|
|
|
|
|
|
|
menu->addChild(new ui::MenuSeparator); |
|
|
|
@@ -410,10 +478,10 @@ |
|
|
|
+ APP->window->setFullScreen(!fullscreen); |
|
|
|
+ })); |
|
|
|
+#endif |
|
|
|
+ |
|
|
|
+ menu->addChild(createBoolPtrMenuItem("Invert zoom", "", &settings::invertZoom)); |
|
|
|
|
|
|
|
- menu->addChild(createBoolPtrMenuItem("Auto-squeeze algorithm (experimental)", "", &settings::squeezeModules)); |
|
|
|
+ menu->addChild(createBoolPtrMenuItem("Invert zoom", "", &settings::invertZoom)); |
|
|
|
+ |
|
|
|
+ static const std::vector<std::string> rateLimitLabels = { |
|
|
|
+ "None", |
|
|
|
+ "2x", |
|
|
|
@@ -431,7 +499,7 @@ |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
@@ -501,47 +665,6 @@ |
|
|
|
@@ -501,47 +728,6 @@ |
|
|
|
//////////////////// |
|
|
|
|
|
|
|
|
|
|
|
@@ -479,7 +547,7 @@ |
|
|
|
struct EngineButton : MenuButton { |
|
|
|
void onAction(const ActionEvent& e) override { |
|
|
|
ui::Menu* menu = createMenu(); |
|
|
|
@@ -555,268 +678,46 @@ |
|
|
|
@@ -555,268 +741,46 @@ |
|
|
|
settings::cpuMeter ^= true; |
|
|
|
})); |
|
|
|
|
|
|
|
@@ -638,7 +706,7 @@ |
|
|
|
- |
|
|
|
- MenuItem::step(); |
|
|
|
- } |
|
|
|
|
|
|
|
- |
|
|
|
- void onAction(const ActionEvent& e) override { |
|
|
|
- std::thread t([=] { |
|
|
|
- library::syncUpdate(slug); |
|
|
|
@@ -701,7 +769,7 @@ |
|
|
|
- addChild(createMenuItem("Browse VCV Library", "", [=]() { |
|
|
|
- system::openBrowser("https://library.vcvrack.com/"); |
|
|
|
- })); |
|
|
|
- |
|
|
|
|
|
|
|
- SyncUpdatesItem* syncItem = new SyncUpdatesItem; |
|
|
|
- syncItem->text = "Update all"; |
|
|
|
- addChild(syncItem); |
|
|
|
@@ -730,7 +798,7 @@ |
|
|
|
- |
|
|
|
-struct LibraryButton : MenuButton { |
|
|
|
- NotificationIcon* notification; |
|
|
|
- |
|
|
|
|
|
|
|
- LibraryButton() { |
|
|
|
- notification = new NotificationIcon; |
|
|
|
- addChild(notification); |
|
|
|
@@ -747,7 +815,7 @@ |
|
|
|
- }); |
|
|
|
- t.detach(); |
|
|
|
- } |
|
|
|
|
|
|
|
- |
|
|
|
- void step() override { |
|
|
|
- notification->box.pos = math::Vec(0, 0); |
|
|
|
- notification->visible = library::hasUpdates(); |
|
|
|
@@ -781,7 +849,7 @@ |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
@@ -827,32 +728,17 @@ |
|
|
|
@@ -827,63 +791,30 @@ |
|
|
|
|
|
|
|
|
|
|
|
struct HelpButton : MenuButton { |
|
|
|
@@ -818,7 +886,9 @@ |
|
|
|
})); |
|
|
|
|
|
|
|
menu->addChild(new ui::MenuSeparator); |
|
|
|
@@ -861,29 +747,9 @@ |
|
|
|
|
|
|
|
+#ifndef DISTRHO_OS_WASM |
|
|
|
menu->addChild(createMenuItem("Open user folder", "", [=]() { |
|
|
|
system::openDirectory(asset::user("")); |
|
|
|
})); |
|
|
|
|
|
|
|
@@ -841,6 +911,7 @@ |
|
|
|
- } |
|
|
|
- } |
|
|
|
+ menu->addChild(new ui::MenuSeparator); |
|
|
|
+#endif |
|
|
|
|
|
|
|
- void step() override { |
|
|
|
- notification->box.pos = math::Vec(0, 0); |
|
|
|
@@ -850,7 +921,7 @@ |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
@@ -926,15 +792,19 @@ |
|
|
|
@@ -926,15 +857,19 @@ |
|
|
|
|
|
|
|
text = ""; |
|
|
|
|
|
|
|
@@ -873,7 +944,7 @@ |
|
|
|
|
|
|
|
Label::step(); |
|
|
|
} |
|
|
|
@@ -944,7 +814,9 @@ |
|
|
|
@@ -944,7 +879,9 @@ |
|
|
|
struct MenuBar : widget::OpaqueWidget { |
|
|
|
InfoLabel* infoLabel; |
|
|
|
|
|
|
|
@@ -884,7 +955,7 @@ |
|
|
|
const float margin = 5; |
|
|
|
box.size.y = BND_WIDGET_HEIGHT + 2 * margin; |
|
|
|
|
|
|
|
@@ -953,7 +825,7 @@ |
|
|
|
@@ -953,7 +890,7 @@ |
|
|
|
layout->spacing = math::Vec(0, 0); |
|
|
|
addChild(layout); |
|
|
|
|
|
|
|
@@ -893,7 +964,7 @@ |
|
|
|
fileButton->text = "File"; |
|
|
|
layout->addChild(fileButton); |
|
|
|
|
|
|
|
@@ -965,13 +837,11 @@ |
|
|
|
@@ -965,13 +902,11 @@ |
|
|
|
viewButton->text = "View"; |
|
|
|
layout->addChild(viewButton); |
|
|
|
|
|
|
|
@@ -909,7 +980,7 @@ |
|
|
|
|
|
|
|
HelpButton* helpButton = new HelpButton; |
|
|
|
helpButton->text = "Help"; |
|
|
|
@@ -1003,7 +873,7 @@ |
|
|
|
@@ -1003,7 +938,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
widget::Widget* createMenuBar() { |
|
|
|
|