REVIEWED: GuiToggleSlider() focus on mouse-hover

This commit is contained in:
Ray 2023-09-11 12:41:14 +02:00
parent 84f2588a4f
commit 5a1be66c8a

View File

@ -2142,7 +2142,8 @@ int GuiToggleSlider(Rectangle bounds, const char *text, int *active)
} }
else state = STATE_FOCUSED; else state = STATE_FOCUSED;
} }
else if (*active) state = STATE_PRESSED;
if ((*active) && (state != STATE_FOCUSED)) state = STATE_PRESSED;
} }
if (*active >= itemCount) *active = 0; if (*active >= itemCount) *active = 0;