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

Method ButtonClicked

Source/DotSequencer.cpp:282–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282void DotSequencer::ButtonClicked(ClickButton* button, double time)
283{
284 if (button == mClearButton)
285 mDotGrid->Clear();
286 if (button == mDoubleButton)
287 {
288 if (mCols * 2 <= mDotGrid->GetMaxColumns())
289 {
290 mCols *= 2;
291 mDotGrid->SetGrid(mCols, mRows);
292 for (int col = 0; col < mCols / 2; ++col)
293 {
294 for (int row = 0; row < mRows; ++row)
295 mDotGrid->CopyDot(DotGrid::DotPosition(col, row), DotGrid::DotPosition(col + mCols / 2, row));
296 }
297 }
298 }
299}
300
301void DotSequencer::DropdownUpdated(DropdownList* list, int oldVal, double time)
302{

Callers

nothing calls this directly

Calls 5

DotPositionClass · 0.85
GetMaxColumnsMethod · 0.80
CopyDotMethod · 0.80
ClearMethod · 0.45
SetGridMethod · 0.45

Tested by

no test coverage detected