From 7460a16cae15dfa7924d1d4df1aac166a6a6fd2c Mon Sep 17 00:00:00 2001 From: jussi Date: Wed, 10 Jan 2024 22:19:00 +0200 Subject: Raygui lib extensions property list. --- include/raygui.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/raygui.h') diff --git a/include/raygui.h b/include/raygui.h index f85bc58..8486dc2 100644 --- a/include/raygui.h +++ b/include/raygui.h @@ -2662,7 +2662,7 @@ int GuiTextBox(Rectangle bounds, char *text, int bufferSize, bool editMode) //if (multiline) cursor.y = GetTextLines() // Finish text editing on ENTER or mouse click outside bounds - if ((!multiline && IsKeyPressed(KEY_ENTER)) || + if ((!multiline && IsKeyPressed(KEY_ENTER)) || (!multiline && IsKeyPressed(KEY_KP_ENTER)) || (!CheckCollisionPointRec(mousePosition, bounds) && IsMouseButtonPressed(MOUSE_LEFT_BUTTON))) { textBoxCursorIndex = 0; // GLOBAL: Reset the shared cursor index @@ -2825,7 +2825,7 @@ int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, in GuiState state = guiState; char textValue[RAYGUI_VALUEBOX_MAX_CHARS + 1] = "\0"; - sprintf(textValue, "%i", *value); + sprintf(textValue, "%i", *value); Rectangle textBounds = { 0 }; if (text != NULL) @@ -2858,6 +2858,7 @@ int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, in { int key = GetCharPressed(); if ((key >= 48) && (key <= 57)) + // if ( ( key >= 48 && key <= 57 ) || key == 45 ) { textValue[keyCount] = (char)key; keyCount++; -- cgit v1.2.3