Skip to content

Commit

Permalink
Sipo - added button for manual
Browse files Browse the repository at this point in the history
  • Loading branch information
stoermelder committed Oct 19, 2019
1 parent d9cdd50 commit 33de77d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Sipo.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "plugin.hpp"
#include "widgets.hpp"
#include <thread>

namespace Sipo {

Expand Down Expand Up @@ -144,6 +145,20 @@ struct SipoWidget : ModuleWidget {
addChild(w);
addOutput(createOutputCentered<StoermelderPort>(Vec(22.5f, 323.5f), module, SipoModule::POLY_OUTPUT));
}

void appendContextMenu(Menu *menu) override {
SipoModule *module = dynamic_cast<SipoModule*>(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<ManualItem>(&MenuItem::text, "Module Manual"));
}
};

} // namespace Sipo
Expand Down

0 comments on commit 33de77d

Please sign in to comment.