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

Method ButtonClicked

Source/EffectChain.cpp:469–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467}
468
469void EffectChain::ButtonClicked(ClickButton* button, double time)
470{
471 if (button == mSpawnEffectButton)
472 {
473 if (mSpawnIndex >= 0 && mSpawnIndex < (int)mEffectTypesToSpawn.size())
474 {
475 AddEffect(mEffectTypesToSpawn[mSpawnIndex], mEffectTypesToSpawn[mSpawnIndex], K(onTheFly));
476 mSpawnIndex = -1;
477 }
478 }
479 if (button == mPush2ExitEffectButton)
480 mPush2DisplayEffect = nullptr;
481 for (int i = 0; i < (int)mEffectControls.size(); ++i)
482 {
483 if (button == mEffectControls[i].mMoveLeftButton)
484 MoveEffect(i, -1);
485 if (button == mEffectControls[i].mMoveRightButton)
486 MoveEffect(i, 1);
487 if (button == mEffectControls[i].mDeleteButton)
488 {
489 mWantToDeleteEffectAtIndex = i;
490 return;
491 }
492 if (button == mEffectControls[i].mPush2DisplayEffectButton)
493 {
494 mPush2DisplayEffect = mEffects[i];
495 mPush2ExitEffectButton->SetLabel((std::string("exit ") + mEffects[i]->Name()).c_str());
496 }
497 }
498}
499
500void EffectChain::CheckboxUpdated(Checkbox* checkbox, double time)
501{

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.80
SetLabelMethod · 0.45
NameMethod · 0.45

Tested by

no test coverage detected