From 679cc2f17f6a1d5bade33150f13b140504a7c196 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Thu, 20 Jan 2022 21:37:29 +0100 Subject: [PATCH] REVIEWED: GuiValueBox() values clamp --- src/raygui.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/raygui.h b/src/raygui.h index 0a9b653..ed1e03d 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -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; }