| 942 | } |
| 943 | |
| 944 | void 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); |
nothing calls this directly
no test coverage detected