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

Method DrawModule

Source/SampleFinder.cpp:130–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void SampleFinder::DrawModule()
131{
132
133 if (Minimized() || IsVisible() == false)
134 return;
135
136 mVolumeSlider->Draw();
137 mPlayCheckbox->Draw();
138 mLoopCheckbox->Draw();
139 mEditCheckbox->Draw();
140
141 if (mSample)
142 {
143 if (!mEditMode)
144 {
145 mSampleDrawer.SetDimensions(200, 40);
146 mSampleDrawer.SetRange(mClipStart, mClipEnd);
147 mSampleDrawer.Draw((int)mPlayhead);
148 }
149 else
150 {
151 mSampleDrawer.SetDimensions(900, 310);
152 mSampleDrawer.SetRange(mZoomStart, mZoomEnd);
153 mSampleDrawer.Draw((int)mPlayhead);
154 mSampleDrawer.DrawLine(mClipStart, ofColor::red);
155 mSampleDrawer.DrawLine(mClipEnd, ofColor::red);
156
157 mClipStartSlider->Draw();
158 mClipEndSlider->Draw();
159 mNumBarsSlider->Draw();
160 mOffsetSlider->Draw();
161 mWriteButton->Draw();
162 mDoubleLengthButton->Draw();
163 mHalveLengthButton->Draw();
164 mReverseCheckbox->Draw();
165 DrawTextNormal(ofToString(mSample->GetPlayPosition()), 335, 50);
166 DrawTextNormal("speed: " + ofToString(GetSpeed()), 4, 55);
167 }
168 }
169}
170
171bool SampleFinder::MouseScrolled(float x, float y, float scrollX, float scrollY, bool isSmoothScroll, bool isInvertedScroll)
172{

Callers

nothing calls this directly

Calls 7

DrawTextNormalFunction · 0.85
ofToStringFunction · 0.85
DrawLineMethod · 0.80
GetPlayPositionMethod · 0.80
DrawMethod · 0.45
SetDimensionsMethod · 0.45
SetRangeMethod · 0.45

Tested by

no test coverage detected