Small request : set getNumDecimalPlacesToDisplay() public


#1

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?


#2

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


#3

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

 


#4

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


#5

thanks!