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

Method paint

Lib/Components/Knob.cpp:35–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void Knob::paint(Graphics& g)
36{
37 float alpha = isEnabled() ? 1.0f : 0.5f;
38
39 mSlider.setAlpha(alpha);
40 g.setColour(juce::Colours::black.withAlpha(alpha));
41 g.setFont(UIDefines::LABEL_FONT());
42
43 if (!mIsMouseOver || !isEnabled()) {
44 g.drawMultiLineText(mLabel, 0, 73, 66, juce::Justification::centred, 0.0f);
45 } else {
46 String value = mSlider.getTextFromValue(mSlider.getValue());
47 g.drawText(value + mPostValueStr,
48 juce::Rectangle<int>(0, 73, getWidth(), getHeight() - 67),
49 juce::Justification::centredTop);
50 }
51}
52
53void Knob::mouseEnter(const MouseEvent& event)
54{

Callers

nothing calls this directly

Calls 1

LABEL_FONTFunction · 0.85

Tested by

no test coverage detected