Fix editor value selector not allowing minimal value change

For example, when the scale is 1, changing the value by exactly 1 was not possible.
This commit is contained in:
Robert Müller 2022-09-04 13:02:31 +02:00
parent 3fd87df844
commit 2e8d203ed4

View file

@ -605,7 +605,7 @@ int CEditor::UiDoValueSelector(void *pID, CUIRect *pRect, const char *pLabel, in
else
s_Value += m_MouseDeltaX;
if(absolute(s_Value) > Scale)
if(absolute(s_Value) >= Scale)
{
int Count = (int)(s_Value / Scale);
s_Value = fmod(s_Value, Scale);