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

Method DrawModule

Source/StepSequencer.cpp:422–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420}
421
422void StepSequencer::DrawModule()
423{
424 if (Minimized() || IsVisible() == false)
425 return;
426
427 mGridYOffDropdown->SetShowing(HasGridController());
428 mAdjustOffsetsCheckbox->SetShowing(!mHasExternalPulseSource);
429 mCurrentColumnSlider->SetExtents(0, GetNumSteps(mStepInterval, mNumMeasures));
430 mRepeatRateDropdown->SetShowing(mNoteInputMode == NoteInputMode::RepeatHeld);
431 mStrengthSlider->SetShowing(mStepVelocityEntryMode == StepVelocityEntryMode::Slider);
432 mVelocityTypeDropdown->SetShowing(mStepVelocityEntryMode == StepVelocityEntryMode::Dropdown);
433
434 mGrid->Draw();
435 mStrengthSlider->Draw();
436 mVelocityTypeDropdown->Draw();
437 mNumMeasuresSlider->Draw();
438 mClearButton->Draw();
439 mAdjustOffsetsCheckbox->Draw();
440 mRepeatRateDropdown->Draw();
441 mGridYOffDropdown->Draw();
442 mStepIntervalDropdown->Draw();
443 mShiftLeftButton->Draw();
444 mShiftRightButton->Draw();
445 mGridControlTarget->Draw();
446 mVelocityGridController->Draw();
447 mMetaStepGridController->Draw();
448 mRandomizationAmountSlider->Draw();
449 mRandomizationDensitySlider->Draw();
450 mRandomizeButton->Draw();
451
452 float gridX, gridY;
453 mGrid->GetPosition(gridX, gridY, true);
454 for (int i = 0; i < NUM_STEPSEQ_ROWS; ++i)
455 {
456 if (i < mNumRows)
457 {
458 float y = gridY + mGrid->GetHeight() - (i + 1) * (mGrid->GetHeight() / float(mNumRows));
459
460 if (mAdjustOffsets)
461 {
462 mOffsetSlider[i]->SetShowing(true);
463 mOffsetSlider[i]->SetPosition(gridX + mGrid->GetWidth() + 5, y);
464 mOffsetSlider[i]->Draw();
465 }
466 else
467 {
468 mOffsetSlider[i]->SetShowing(false);
469 }
470
471 mRandomizeRowButton[i]->Draw();
472
473 mRows[i]->Draw(gridX, y);
474 }
475 else
476 {
477 mOffsetSlider[i]->SetShowing(false);
478 }
479 }

Callers

nothing calls this directly

Calls 15

ofPushStyleFunction · 0.85
ofNoFillFunction · 0.85
ofSetLineWidthFunction · 0.85
ofSetColorFunction · 0.85
ofRectFunction · 0.85
ofPopStyleFunction · 0.85
ofFillFunction · 0.85
ofCircleFunction · 0.85
SetShowingMethod · 0.45
SetExtentsMethod · 0.45
DrawMethod · 0.45
GetPositionMethod · 0.45

Tested by

no test coverage detected