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

Method DrawList

Source/MidiController.cpp:2830–2873  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2828}
2829
2830void UIControlConnection::DrawList(int index)
2831{
2832 PreDraw();
2833
2834 mControlEntry->DrawLabel(false);
2835 mChannelDropdown->DrawLabel(false);
2836 mValueEntry->DrawLabel(false);
2837 mMidiOffEntry->DrawLabel(false);
2838 mMidiOnEntry->DrawLabel(false);
2839 mIncrementalEntry->DrawLabel(false);
2840 mFeedbackDropdown->DrawLabel(false);
2841
2842 if (mControl < 32)
2843 m14BitModeCheckbox->SetShowing(false);
2844
2845 int x = 12;
2846 int y = 52 + 20 * index;
2847
2848 for (auto iter = mEditorControls.begin(); iter != mEditorControls.end(); ++iter)
2849 {
2850 (*iter)->SetPosition(x, y);
2851 (*iter)->Draw();
2852
2853 x += (*iter)->GetRect().width + 3;
2854 if (*iter == mUIControlPathEntry)
2855 x += 13;
2856 }
2857
2858 ofRectangle rect = mUIControlPathEntry->GetRect(true);
2859 if (mUIOwner->GetLayoutControl(mControl, mMessageType).mControlCable)
2860 mUIOwner->GetLayoutControl(mControl, mMessageType).mControlCable->SetManualPosition(rect.x + rect.width - 5, rect.y + rect.height / 2);
2861
2862 if (gTime - mLastActivityTime > 0 && gTime - mLastActivityTime < 200)
2863 {
2864 ofPushStyle();
2865 if (GetUIControl())
2866 ofSetColor(0, 255, 0, 255 * (1 - (gTime - mLastActivityTime) / 200));
2867 else
2868 ofSetColor(255, 0, 0, 255 * (1 - (gTime - mLastActivityTime) / 200));
2869 ofFill();
2870 ofRect(1, y + 3, 10, 10);
2871 ofPopStyle();
2872 }
2873}
2874
2875void UIControlConnection::DrawLayout()
2876{

Callers 1

DrawModuleMethod · 0.80

Calls 11

ofPushStyleFunction · 0.85
ofSetColorFunction · 0.85
ofFillFunction · 0.85
ofRectFunction · 0.85
ofPopStyleFunction · 0.85
SetManualPositionMethod · 0.80
DrawLabelMethod · 0.45
SetShowingMethod · 0.45
SetPositionMethod · 0.45
DrawMethod · 0.45
GetRectMethod · 0.45

Tested by

no test coverage detected