| 988 | } |
| 989 | |
| 990 | void MidiController::DrawModule() |
| 991 | { |
| 992 | if (gTime - mLastActivityTime > 0 && gTime - mLastActivityTime < 200) |
| 993 | { |
| 994 | ofPushStyle(); |
| 995 | if (mLastActivityBound) |
| 996 | ofSetColor(0, 255, 0, 255 * (1 - (gTime - mLastActivityTime) / 200)); |
| 997 | else |
| 998 | ofSetColor(255, 0, 0, 255 * (1 - (gTime - mLastActivityTime) / 200)); |
| 999 | ofFill(); |
| 1000 | ofRect(30 + gFont.GetStringWidth(Name(), 13), -11, 10, 10); |
| 1001 | ofPopStyle(); |
| 1002 | } |
| 1003 | |
| 1004 | if (!mIsConnected) |
| 1005 | { |
| 1006 | float xStart = 30 + gFont.GetStringWidth(Name(), 13); |
| 1007 | float yStart = -11; |
| 1008 | |
| 1009 | ofPushStyle(); |
| 1010 | ofSetColor(ofColor::red); |
| 1011 | ofLine(xStart, yStart, xStart + 10, yStart + 10); |
| 1012 | ofLine(xStart + 10, yStart, xStart, yStart + 10); |
| 1013 | ofPopStyle(); |
| 1014 | } |
| 1015 | |
| 1016 | if (TheSynth->GetLastClickedModule() == this) |
| 1017 | { |
| 1018 | for (auto i = mListeners[mControllerPage].begin(); i != mListeners[mControllerPage].end(); ++i) |
| 1019 | DrawConnection(dynamic_cast<IDrawableModule*>(*i)); |
| 1020 | } |
| 1021 | |
| 1022 | if (Minimized() || IsVisible() == false) |
| 1023 | return; |
| 1024 | |
| 1025 | if (!mHasCreatedConnectionUIControls) |
| 1026 | { |
| 1027 | int i = 0; |
| 1028 | for (UIControlConnection* connection : mConnections) |
| 1029 | { |
| 1030 | connection->CreateUIControls(i); |
| 1031 | ++i; |
| 1032 | } |
| 1033 | mHasCreatedConnectionUIControls = true; |
| 1034 | } |
| 1035 | |
| 1036 | mControllerList->Draw(); |
| 1037 | mMappingDisplayModeSelector->Draw(); |
| 1038 | mBindCheckbox->Draw(); |
| 1039 | mPageSelector->Draw(); |
| 1040 | //mDrawCablesCheckbox->Draw(); |
| 1041 | mLayoutFileDropdown->SetShowing(mMappingDisplayMode == kLayout); |
| 1042 | mLayoutFileDropdown->Draw(); |
| 1043 | mOscInPortEntry->SetShowing(mDeviceIn == "osccontroller" && mMappingDisplayMode == kLayout); |
| 1044 | mOscInPortEntry->Draw(); |
| 1045 | mMonomeDeviceDropdown->SetShowing(mDeviceIn == "monome" && mMappingDisplayMode == kLayout); |
| 1046 | mMonomeDeviceDropdown->Draw(); |
| 1047 |
nothing calls this directly
no test coverage detected