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

Method DrawLowerModuleSelector

Source/Push2Control.cpp:902–935  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

900}
901
902void Push2Control::DrawLowerModuleSelector()
903{
904 int bottomRowLedColors[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
905 for (int i = 0; i < mModules.size(); ++i)
906 {
907 if (i - mModuleListOffset < -1 || i - mModuleListOffset > 8)
908 continue;
909
910 ofPushMatrix();
911 ofPushStyle();
912
913 ofClipWindow(kColumnSpacing * (i - mModuleListOffsetSmoothed), 0, kColumnSpacing, ableton::Push2DisplayBitmap::kHeight * kPixelRatio, true);
914
915 float x;
916 float y;
917 mModules[i]->GetPosition(x, y, true);
918 mModules[i]->SetPosition(3 + kColumnSpacing * (i - mModuleListOffsetSmoothed), 120);
919 float titleBarHeight;
920 float highlight;
921 mModules[i]->DrawFrame(kColumnSpacing - 14, 80, true, titleBarHeight, highlight);
922 if (mModules[i] == mDisplayModule)
923 DrawDisplayModuleRect(ofRectangle(0, 0, kColumnSpacing - 14, 80), 3);
924 mModules[i]->SetPosition(x, y);
925
926 if (i - round(mModuleListOffset) >= 0 && i - round(mModuleListOffset) < 8)
927 bottomRowLedColors[i - (int)round(mModuleListOffset)] = GetPadColorForType(mModules[i]->GetModuleCategory(), true);
928
929 ofPopMatrix();
930 ofPopStyle();
931 }
932
933 for (int i = 0; i < 8; ++i)
934 SetLed(kMidiMessage_Control, i + kBelowScreenButtonRow, bottomRowLedColors[i]);
935}
936
937void Push2Control::DrawRoutingDisplay()
938{

Callers

nothing calls this directly

Calls 11

ofPushMatrixFunction · 0.85
ofPushStyleFunction · 0.85
ofClipWindowFunction · 0.85
ofRectangleClass · 0.85
ofPopMatrixFunction · 0.85
ofPopStyleFunction · 0.85
sizeMethod · 0.80
DrawFrameMethod · 0.80
GetPositionMethod · 0.45
SetPositionMethod · 0.45
GetModuleCategoryMethod · 0.45

Tested by

no test coverage detected