MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / ButtonClicked

Method ButtonClicked

Source/HelpDisplay.cpp:371–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371void HelpDisplay::ButtonClicked(ClickButton* button, double time)
372{
373 if (button == mTutorialVideoLinkButton)
374 {
375 juce::URL("https://youtu.be/SYBc8X2IxqM").launchInDefaultBrowser();
376 }
377 if (button == mDocsLinkButton)
378 {
379 juce::URL("http://bespokesynth.com/docs").launchInDefaultBrowser();
380 }
381 if (button == mDiscordLinkButton)
382 {
383 juce::URL("https://discord.gg/YdTMkvvpZZ").launchInDefaultBrowser();
384 }
385 if (button == mCopyBuildInfoButton)
386 {
387 juce::SystemClipboard::copyTextToClipboard("bespoke " + juce::String(GetBuildInfoString()) + " - " + juce::SystemStats::getOperatingSystemName() + " - " + Bespoke::GIT_BRANCH + " " + Bespoke::GIT_HASH);
388 }
389 if (button == mDumpModuleInfoButton)
390 {
391 LoadTooltips();
392
393 std::vector<ModuleCategory> moduleTypes = {
394 kModuleCategory_Note,
395 kModuleCategory_Synth,
396 kModuleCategory_Audio,
397 kModuleCategory_Instrument,
398 kModuleCategory_Processor,
399 kModuleCategory_Modulator,
400 kModuleCategory_Pulse,
401 kModuleCategory_Other
402 };
403 for (auto type : moduleTypes)
404 {
405 const auto& modules = TheSynth->GetModuleFactory()->GetSpawnableModules(type);
406 for (auto toSpawn : modules)
407 TheSynth->SpawnModuleOnTheFly(toSpawn, 0, 0);
408 }
409
410 std::string output;
411 std::vector<IDrawableModule*> modules;
412 TheSynth->GetAllModules(modules);
413
414 for (auto* topLevelModule : modules)
415 {
416 if (topLevelModule->GetTypeName() == "effectchain")
417 {
418 EffectChain* effectChain = dynamic_cast<EffectChain*>(topLevelModule);
419 std::vector<std::string> effects = TheSynth->GetEffectFactory()->GetSpawnableEffects();
420 for (std::string effect : effects)
421 effectChain->AddEffect(effect, effect, !K(onTheFly));
422 }
423
424 std::vector<IDrawableModule*> toDump;
425 toDump.push_back(topLevelModule);
426 for (auto* child : topLevelModule->GetChildren())
427 toDump.push_back(child);
428

Callers

nothing calls this directly

Calls 15

StringClass · 0.85
GetBuildInfoStringFunction · 0.85
ListContainsFunction · 0.85
ofStringReplaceFunction · 0.85
VectorContainsFunction · 0.85
ofToDataPathFunction · 0.85
GetSpawnableModulesMethod · 0.80
GetModuleFactoryMethod · 0.80
SpawnModuleOnTheFlyMethod · 0.80
GetTypeNameMethod · 0.80
GetSpawnableEffectsMethod · 0.80
GetEffectFactoryMethod · 0.80

Tested by

no test coverage detected