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

Method DrawModule

Source/Arpeggiator.cpp:73–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void Arpeggiator::DrawModule()
74{
75 if (Minimized() || IsVisible() == false)
76 return;
77
78 ofSetColor(255, 255, 255, gModuleDrawAlpha);
79
80 mIntervalSelector->Draw();
81 mArpStepSlider->Draw();
82 mOctaveRepeatsSlider->Draw();
83
84 ofSetColor(200, 200, 200, gModuleDrawAlpha);
85 std::string chord;
86 for (int i = 0; i < mChord.size(); ++i)
87 chord += GetArpNoteDisplay(mChord[i].pitch) + " ";
88 DrawTextNormal(chord, 5, 16);
89 ofSetColor(0, 255, 0, gModuleDrawAlpha);
90 std::string pad;
91 for (int i = 0; i < mChord.size(); ++i)
92 {
93 if (i != mArpIndex)
94 {
95 pad += GetArpNoteDisplay(mChord[i].pitch) + " ";
96 }
97 else
98 {
99 float w = gFont.GetStringWidth(pad, 13);
100 DrawTextNormal(GetArpNoteDisplay(mChord[i].pitch), 6 + w, 16);
101 break;
102 }
103 }
104}
105
106void Arpeggiator::OnScaleChanged()
107{

Callers

nothing calls this directly

Calls 5

ofSetColorFunction · 0.85
DrawTextNormalFunction · 0.85
sizeMethod · 0.80
GetStringWidthMethod · 0.80
DrawMethod · 0.45

Tested by

no test coverage detected