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

Method DrawModule

Source/VSTPlugin.cpp:964–1001  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

962}
963
964void VSTPlugin::DrawModule()
965{
966 if (Minimized() || IsVisible() == false)
967 return;
968
969 mVolSlider->Draw();
970 mPresetFileSelector->Draw();
971 mSavePresetFileButton->Draw();
972 mOpenEditorButton->Draw();
973 mPanicButton->Draw();
974 mShowParameterDropdown->Draw();
975
976 ofPushStyle();
977 ofSetColor(IDrawableModule::GetColor(kModuleCategory_Note));
978 DrawTextRightJustify("midi out:", 206 - 18, 14);
979 ofPopStyle();
980
981 if (mDisplayMode == kDisplayMode_Sliders)
982 {
983 int sliderCount = 0;
984 for (auto& slider : mParameterSliders)
985 {
986 if (slider.mSlider)
987 {
988 slider.mSlider->SetShowing(slider.mShowing);
989 if (slider.mShowing)
990 {
991 const int kRows = 20;
992 slider.mSlider->SetPosition(3 + (slider.mSlider->GetRect().width + 2) * (sliderCount / kRows), 60 + (17 * (sliderCount % kRows)));
993
994 slider.mSlider->Draw();
995
996 ++sliderCount;
997 }
998 }
999 }
1000 }
1001}
1002
1003void VSTPlugin::GetModuleDimensions(float& width, float& height)
1004{

Callers

nothing calls this directly

Calls 8

ofPushStyleFunction · 0.85
ofSetColorFunction · 0.85
DrawTextRightJustifyFunction · 0.85
ofPopStyleFunction · 0.85
DrawMethod · 0.45
SetShowingMethod · 0.45
SetPositionMethod · 0.45
GetRectMethod · 0.45

Tested by

no test coverage detected