rxi / microui

A tiny immediate-mode UI library
MIT License
3.29k stars 239 forks source link

'step' does not work with mu_slider_ex #65

Closed petrihakkinen closed 3 weeks ago

petrihakkinen commented 10 months ago

It appears that the 'step' argument does not work with sliders. No matter which value I use the value is not rounded to multiple of 'step'. I briefly looked at the code and it seems cast to int or floor call is missing from microui.c line 873:

if (step) { v = (((v + step / 2) / step)) * step; }

rxi commented 3 weeks ago

Thanks!