Hello, according to the youtube lecture below
it suffices to code like below
inline juce::Colour jucecol(int r, int g, int b)
{
return juce::Colour::Colour((uint8_t)r, (uint8_t)g, (uint8_t)b, (uint8_t)255);
}
MainComponent::MainComponent() : shapebutton(“—”, jucecol(123, 3, 3), jucecol(113, 33, 223), jucecol(223, 113, 23))
{
…
juce::Path bs;
bs.addRectangle(0, 0, 50, 50);
shapebutton.setShape(bs, true, true, false);
addAndMakeVisible(shapebutton);
…
where juce::ShapeButton shapebutton is defined in the header
The button really appears on the main component window
however, that button does not change its color when clicked
That youtube lecture above shows it just guarantees to change its color (around 5:35 ~ )
So could you please help me with this issue?
Thank you