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

Method DrawModule

Source/PulseTrain.cpp:89–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89void PulseTrain::DrawModule()
90{
91 if (Minimized() || IsVisible() == false)
92 return;
93
94 ofSetColor(255, 255, 255, gModuleDrawAlpha);
95
96 mIntervalSelector->Draw();
97 mLengthSlider->Draw();
98 mVelocityGrid->Draw();
99
100 for (int i = 0; i < kMaxSteps; ++i)
101 {
102 if (i < mLength)
103 {
104 ofVec2f pos = mVelocityGrid->GetCellPosition(i, 0) + mVelocityGrid->GetPosition(true);
105 pos.x += mVelocityGrid->GetWidth() / float(mLength) * .5f;
106 pos.y += mVelocityGrid->GetHeight() + 8;
107 mStepCables[i]->SetManualPosition(pos.x, pos.y);
108 mStepCables[i]->SetEnabled(true);
109 }
110 else
111 {
112 mStepCables[i]->SetEnabled(false);
113 }
114 }
115}
116
117void PulseTrain::CheckboxUpdated(Checkbox* checkbox, double time)
118{

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected