Skip to content

Commit

Permalink
REVIEWED: GuiToggleSlider() focus on mouse-hover
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Sep 11, 2023
1 parent 84f2588 commit 5a1be66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/raygui.h
Original file line number Diff line number Diff line change
Expand Up @@ -2142,7 +2142,8 @@ int GuiToggleSlider(Rectangle bounds, const char *text, int *active)
}
else state = STATE_FOCUSED;
}
else if (*active) state = STATE_PRESSED;

if ((*active) && (state != STATE_FOCUSED)) state = STATE_PRESSED;
}

if (*active >= itemCount) *active = 0;
Expand Down

0 comments on commit 5a1be66

Please sign in to comment.