Small request : set getNumDecimalPlacesToDisplay() public

Hi Jules. Could you set Slider::getNumDecimalPlacesToDisplay() public?

I would like to use it in my lnf drawLinearSlider()

Or is there any particular reason it's currently protected?

In your Slider derived class you can use the String constructor to set the number of decimal points…

String CCustomSlider::getTextFromValue (const double value)
{m
    return value == 0.0 ? m_szMinText : (String ((float) value, 0) + "%");
}

Rail

that could be used for Slider too (not derived class). I don't get the reason of getNumDecimalPlacesToDisplay() being protected anyway.

 

Yes, it could and probably should be public, will change that..

thanks!