Update raygui to avoid warnings

This commit is contained in:
Ray
2025-11-18 20:59:48 +01:00
parent f3393b8fd8
commit 46ca641ec5
3 changed files with 667 additions and 435 deletions

View File

@@ -3026,9 +3026,9 @@ int GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int
// NOTE: Requires static variables: frameCounter
int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode)
{
//#if !defined(RAYGUI_VALUEBOX_MAX_CHARS)
#if !defined(RAYGUI_VALUEBOX_MAX_CHARS)
#define RAYGUI_VALUEBOX_MAX_CHARS 32
//#endif
#endif
int result = 0;
GuiState state = guiState;
@@ -3087,7 +3087,7 @@ int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, in
}
// Add new digit to text value
if ((keyCount < RAYGUI_VALUEBOX_MAX_CHARS) && (GuiGetTextWidth(textValue) < bounds.width))
if ((keyCount >= 0) && (keyCount < RAYGUI_VALUEBOX_MAX_CHARS) && (GuiGetTextWidth(textValue) < bounds.width))
{
int key = GetCharPressed();