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

Method SpawnEnvelopeEditor

Source/ADSRDisplay.cpp:383–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381}
382
383void ADSRDisplay::SpawnEnvelopeEditor()
384{
385 if (mEditor == nullptr)
386 {
387 ModuleFactory::Spawnable spawnable;
388 spawnable.mLabel = "envelopeeditor";
389 mEditor = dynamic_cast<EnvelopeEditor*>(TheSynth->SpawnModuleOnTheFly(spawnable, -1, -1, false, "envelopepopup"));
390 mEditor->SetADSRDisplay(this);
391 }
392 if (!mEditor->IsPinned())
393 {
394 mEditor->SetPosition(GetPosition().x + mWidth, GetPosition().y);
395 mEditor->SetOwningContainer(GetModuleParent()->GetOwningContainer());
396 TheSynth->PushModalFocusItem(mEditor);
397 }
398}
399
400void ADSRDisplay::OnClicked(float x, float y, bool right)
401{

Callers 1

PollMethod · 0.80

Calls 7

SpawnModuleOnTheFlyMethod · 0.80
SetADSRDisplayMethod · 0.80
SetOwningContainerMethod · 0.80
GetOwningContainerMethod · 0.80
PushModalFocusItemMethod · 0.80
IsPinnedMethod · 0.45
SetPositionMethod · 0.45

Tested by

no test coverage detected