MCPcopy Create free account
hub / github.com/DamRsn/NeuralNote / paint

Method paint

NeuralNote/Source/Components/Views/TimeQuantizeOptionsView.cpp:61–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void TimeQuantizeOptionsView::paint(Graphics& g)
62{
63 g.setColour(WHITE_TRANSPARENT);
64 g.fillRoundedRectangle(0.0f,
65 static_cast<float>(LEFT_SECTIONS_TOP_PAD),
66 static_cast<float>(getWidth()),
67 static_cast<float>(getHeight() - LEFT_SECTIONS_TOP_PAD),
68 5.0f);
69
70 float alpha = isEnabled() && mIsViewEnabled ? 1.0f : DISABLED_ALPHA;
71
72 mQuantizationForceSlider->setAlpha(alpha);
73 g.setColour(BLACK.withAlpha(alpha));
74 g.setFont(UIDefines::TITLE_FONT());
75 g.drawText("TIME QUANTIZE", Rectangle<int>(24, 0, 210, 17), Justification::centredLeft);
76
77 g.setFont(UIDefines::LABEL_FONT());
78 g.drawText("TEMPO", Rectangle<int>(19, LEFT_SECTIONS_TOP_PAD + 45, 50, 14), Justification::centredLeft);
79
80 g.drawText("TIME SIGNATURE", Rectangle<int>(110, LEFT_SECTIONS_TOP_PAD + 45, 100, 14), Justification::centredRight);
81 g.drawText("/", Rectangle<int>(233, LEFT_SECTIONS_TOP_PAD + 45, 5, 14), Justification::centred);
82
83 g.drawText("TIME DIVISION", Rectangle<int>(19, mTimeDivisionDropdown->getY(), 120, 17), Justification::centredLeft);
84
85 g.drawText("FORCE", Rectangle<int>(19, mQuantizationForceSlider->getY(), 37, 17), Justification::centredLeft);
86}
87
88void TimeQuantizeOptionsView::parameterValueChanged(int parameterIndex, float newValue)
89{

Callers

nothing calls this directly

Calls 2

TITLE_FONTFunction · 0.85
LABEL_FONTFunction · 0.85

Tested by

no test coverage detected