mirror of
https://github.com/raysan5/raygui.git
synced 2025-12-25 10:22:33 -05:00
REVIEWED: GuiValueBox() values clamp
This commit is contained in:
@ -2202,8 +2202,9 @@ bool GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, i
|
||||
|
||||
if (valueHasChanged) *value = TextToInteger(textValue);
|
||||
|
||||
if (*value > maxValue) *value = maxValue;
|
||||
else if (*value < minValue) *value = minValue;
|
||||
// NOTE: We are not clamp values until user input finishes
|
||||
//if (*value > maxValue) *value = maxValue;
|
||||
//else if (*value < minValue) *value = minValue;
|
||||
|
||||
if (IsKeyPressed(KEY_ENTER) || (!CheckCollisionPointRec(mousePoint, bounds) && IsMouseButtonPressed(MOUSE_LEFT_BUTTON))) pressed = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user