| 204 | } |
| 205 | |
| 206 | void ControllingSong::DrawModule() |
| 207 | { |
| 208 | if (Minimized() || IsVisible() == false) |
| 209 | return; |
| 210 | |
| 211 | mNextSongButton->Draw(); |
| 212 | mSongSelector->Draw(); |
| 213 | mTestBeatOffsetSlider->Draw(); |
| 214 | mPlayCheckbox->Draw(); |
| 215 | mShuffleCheckbox->Draw(); |
| 216 | mPhraseForwardButton->Draw(); |
| 217 | mPhraseBackButton->Draw(); |
| 218 | mSpeedSlider->Draw(); |
| 219 | mMuteCheckbox->Draw(); |
| 220 | mVolumeSlider->Draw(); |
| 221 | |
| 222 | if (mCurrentSongIndex != -1) |
| 223 | { |
| 224 | ofPushMatrix(); |
| 225 | ofTranslate(10, 50); |
| 226 | if (mCurrentSongIndex != -1) |
| 227 | DrawTextNormal(mSongList["songs"][mCurrentSongIndex]["name"].asString(), 0, -10); |
| 228 | DrawAudioBuffer(540, 100, mSample.Data(), 0, mSample.LengthInSamples() / mSample.GetSampleRateRatio(), mSample.GetPlayPosition()); |
| 229 | ofPopMatrix(); |
| 230 | } |
| 231 | |
| 232 | ofPushStyle(); |
| 233 | float w, h; |
| 234 | GetDimensions(w, h); |
| 235 | ofFill(); |
| 236 | ofSetColor(255, 255, 255, 50); |
| 237 | float beatWidth = w / 4; |
| 238 | ofRect(int(TheTransport->GetMeasurePos(gTime) * 4) * beatWidth, 0, beatWidth, h); |
| 239 | ofPopStyle(); |
| 240 | } |
| 241 | |
| 242 | void ControllingSong::DropdownUpdated(DropdownList* list, int oldVal, double time) |
| 243 | { |
nothing calls this directly
no test coverage detected