From 33de77d6b80f47f8932f95d59152665254f176fa Mon Sep 17 00:00:00 2001 From: stoermelder Date: Sat, 19 Oct 2019 10:26:56 +0200 Subject: [PATCH] Sipo - added button for manual --- src/Sipo.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Sipo.cpp b/src/Sipo.cpp index ec7eca02..9cb5716d 100644 --- a/src/Sipo.cpp +++ b/src/Sipo.cpp @@ -1,5 +1,6 @@ #include "plugin.hpp" #include "widgets.hpp" +#include namespace Sipo { @@ -144,6 +145,20 @@ struct SipoWidget : ModuleWidget { addChild(w); addOutput(createOutputCentered(Vec(22.5f, 323.5f), module, SipoModule::POLY_OUTPUT)); } + + void appendContextMenu(Menu *menu) override { + SipoModule *module = dynamic_cast(this->module); + assert(module); + + struct ManualItem : MenuItem { + void onAction(const event::Action &e) override { + std::thread t(system::openBrowser, "https://github.com/stoermelder/vcvrack-packone/blob/v1/docs/Sipo.md"); + t.detach(); + } + }; + + menu->addChild(construct(&MenuItem::text, "Module Manual")); + } }; } // namespace Sipo