Page 1 of 1

Make sprite-button.number round instead of truncate

Posted: Fri Jun 12, 2020 11:31 am
by Therenas
Currently, when settings a number on sprite-buttons, it formats it in a nice way so it fits on the button. That part is fine. What is not optimal imo is that the number just gets truncated. So when you set a number to 138.9999, is shows as 138, which it shouldn't I think, that is just wrong. Applying normal rounding to the number would be more what you'd expect.

Re: Make sprite-button.number round instead of truncate

Posted: Fri Jun 12, 2020 4:05 pm
by Rseding91
You know you could just round the number yourself right?

Re: Make sprite-button.number round instead of truncate

Posted: Fri Jun 12, 2020 6:25 pm
by Therenas
I do, but wouldn't it be nice if the button behaved nicely out of the box? Also, I'd have to round it to the exact number of digits that the button would show, which is not trivial I think.