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

Method DrawModule

Source/GridSliders.cpp:138–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void GridSliders::DrawModule()
139{
140 if (Minimized() || IsVisible() == false)
141 return;
142
143 mGridControlTarget->Draw();
144 mDirectionSelector->Draw();
145
146 for (size_t i = 0; i < mControlCables.size(); ++i)
147 {
148 bool drawCable = false;
149 int numCables = 0;
150 if (mGridControlTarget->GetGridController())
151 {
152 if (mDirection == Direction::kVertical)
153 numCables = mGridControlTarget->GetGridController()->NumCols();
154 else
155 numCables = mGridControlTarget->GetGridController()->NumRows();
156 if (mGridControlTarget->GetGridController() && (int)i < numCables)
157 drawCable = true;
158 }
159
160 mControlCables[i]->SetShowing(drawCable);
161 }
162}
163
164void GridSliders::OnClicked(float x, float y, bool right)
165{

Callers

nothing calls this directly

Calls 6

sizeMethod · 0.80
GetGridControllerMethod · 0.80
DrawMethod · 0.45
NumColsMethod · 0.45
NumRowsMethod · 0.45
SetShowingMethod · 0.45

Tested by

no test coverage detected