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

Method DrawModule

Source/PulseSequence.cpp:95–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void PulseSequence::DrawModule()
96{
97 if (Minimized() || IsVisible() == false)
98 return;
99
100 ofSetColor(255, 255, 255, gModuleDrawAlpha);
101
102 mIntervalSelector->SetShowing(!mHasExternalPulseSource);
103 mAdvanceBackwardButton->SetShowing(mHasExternalPulseSource);
104 mAdvanceForwardButton->SetShowing(mHasExternalPulseSource);
105 mPulseOnAdvanceCheckbox->SetShowing(mHasExternalPulseSource);
106
107 mIntervalSelector->Draw();
108 mLengthSlider->Draw();
109 mVelocityGrid->Draw();
110 mAdvanceBackwardButton->Draw();
111 mAdvanceForwardButton->Draw();
112 mPulseOnAdvanceCheckbox->Draw();
113 mShiftLeftButton->Draw();
114 mShiftRightButton->Draw();
115
116 for (int i = 0; i < kIndividualStepCables; ++i)
117 {
118 if (i < mLength)
119 {
120 ofVec2f pos = mVelocityGrid->GetCellPosition(i, 0) + mVelocityGrid->GetPosition(true);
121 pos.x += mVelocityGrid->GetWidth() / float(mLength) * .5f;
122 pos.y += mVelocityGrid->GetHeight() + 8;
123 mStepCables[i]->SetManualPosition(pos.x, pos.y);
124 mStepCables[i]->SetEnabled(true);
125 }
126 else
127 {
128 mStepCables[i]->SetEnabled(false);
129 }
130 }
131}
132
133void PulseSequence::CheckboxUpdated(Checkbox* checkbox, double time)
134{

Callers

nothing calls this directly

Calls 9

ofSetColorFunction · 0.85
SetManualPositionMethod · 0.80
SetShowingMethod · 0.45
DrawMethod · 0.45
GetCellPositionMethod · 0.45
GetPositionMethod · 0.45
GetWidthMethod · 0.45
GetHeightMethod · 0.45
SetEnabledMethod · 0.45

Tested by

no test coverage detected