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

Method UpdateLights

Source/SamplerGrid.cpp:276–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276void SamplerGrid::UpdateLights()
277{
278 if (!mGridControlTarget->GetGridController())
279 return;
280
281 //clear lights
282 for (int x = 0; x < mCols; ++x)
283 {
284 mGridControlTarget->GetGridController()->SetLight(x, mRows, mClear ? kGridColor1Bright : kGridColorOff);
285 for (int y = 0; y < mRows; ++y)
286 {
287 int idx = GridToIdx(x, y);
288 mGridControlTarget->GetGridController()->SetLight(x, y, mGridSamples[idx].mHasSample ? kGridColor2Bright : kGridColorOff);
289 }
290 }
291 for (int y = 0; y < mRows; ++y)
292 {
293 mGridControlTarget->GetGridController()->SetLight(mCols, y, kGridColor1Bright);
294 }
295 mGridControlTarget->GetGridController()->SetLight(mCols, mRows, mClear ? kGridColor1Bright : kGridColorOff);
296}
297
298void SamplerGrid::SetEnabled(bool enabled)
299{

Callers

nothing calls this directly

Calls 2

GetGridControllerMethod · 0.80
SetLightMethod · 0.45

Tested by

no test coverage detected