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

Method DrawModule

Source/SamplePlayer.cpp:944–1186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

942}
943
944void SamplePlayer::DrawModule()
945{
946 if (Minimized() || IsVisible() == false)
947 return;
948
949 mTrimToZoomButton->SetShowing(mZoomLevel != 1);
950
951 mVolumeSlider->Draw();
952 mSpeedSlider->Draw();
953 mLoopCheckbox->Draw();
954 mPlayButton->Draw();
955 mPauseButton->Draw();
956 mStopButton->Draw();
957 mTrimToZoomButton->Draw();
958 mDownloadYoutubeButton->Draw();
959 mDownloadYoutubeSearch->Draw();
960 mLoadFileButton->Draw();
961 mSaveFileButton->Draw();
962 mRecordCheckbox->Draw();
963 mCuePointSelector->Draw();
964 mSetCuePointCheckbox->Draw();
965 mSelectPlayedCuePointCheckbox->Draw();
966 mCuePointStartSlider->Draw();
967 mCuePointLengthSlider->Draw();
968 mCuePointSpeedSlider->Draw();
969 mCuePointStopCheckbox->Draw();
970 mPlayCurrentCuePointButton->Draw();
971 mShowGridCheckbox->Draw();
972 mAutoSlice4->Draw();
973 mAutoSlice8->Draw();
974 mAutoSlice16->Draw();
975 mAutoSlice32->Draw();
976 mRecordingAppendModeCheckbox->Draw();
977 mRecordAsClipsCheckbox->Draw();
978 mRecordGate.Draw();
979
980 for (size_t i = 0; i < mSearchResultButtons.size(); ++i)
981 {
982 if (i < mYoutubeSearchResults.size())
983 {
984 mSearchResultButtons[i]->SetShowing(true);
985 int minutes = int(mYoutubeSearchResults[i].lengthSeconds / 60);
986 int secondsRemainder = int(mYoutubeSearchResults[i].lengthSeconds) % 60;
987 std::string lengthStr = ofToString(minutes) + ":";
988 if (secondsRemainder < 10)
989 lengthStr += "0";
990 lengthStr += ofToString(secondsRemainder);
991 mSearchResultButtons[i]->SetLabel(("(" + lengthStr + ") " + mYoutubeSearchResults[i].name + " [" + mYoutubeSearchResults[i].channel + "]").c_str());
992 }
993 else
994 {
995 mSearchResultButtons[i]->SetShowing(false);
996 }
997 mSearchResultButtons[i]->Draw();
998 }
999
1000 ofPushMatrix();
1001 ofTranslate(5, 58);

Callers

nothing calls this directly

Calls 15

ofToStringFunction · 0.85
ofPushMatrixFunction · 0.85
ofTranslateFunction · 0.85
ofSetColorFunction · 0.85
ofRectFunction · 0.85
DrawAudioBufferFunction · 0.85
ofPopMatrixFunction · 0.85
ofPushStyleFunction · 0.85
ofFillFunction · 0.85
ofCircleFunction · 0.85
ofPopStyleFunction · 0.85
DrawTextNormalFunction · 0.85

Tested by

no test coverage detected