Update raygui.h

This commit is contained in:
Ray
2026-03-08 23:37:19 +01:00
parent fa7b1c662d
commit ae7115dd87

View File

@ -1,6 +1,6 @@
/*******************************************************************************************
*
* raygui v5.0-dev - A simple and easy-to-use immediate-mode gui library
* raygui v5.0 - A simple and easy-to-use immediate-mode gui library
*
* DESCRIPTION:
* raygui is a tools-dev-focused immediate-mode-gui library based on raylib but also
@ -1096,11 +1096,11 @@ typedef enum {
#if defined(RAYGUI_IMPLEMENTATION)
#include <ctype.h> // required for: isspace() [GuiTextBox()]
#include <stdio.h> // Required for: FILE, fopen(), fclose(), fprintf(), feof(), fscanf(), snprintf(), vsprintf() [GuiLoadStyle(), GuiLoadIcons()]
#include <string.h> // Required for: strlen() [GuiTextBox(), GuiValueBox()], memset(), memcpy()
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end() [TextFormat()]
#include <math.h> // Required for: roundf() [GuiColorPicker()]
#include <ctype.h> // Required for: isspace() [GuiTextBox()]
// Allow custom memory allocators
#if defined(RAYGUI_MALLOC) || defined(RAYGUI_CALLOC) || defined(RAYGUI_FREE)
@ -2718,7 +2718,6 @@ int GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
textLength -= accCodepointSize;
}
else if ((textLength > textBoxCursorIndex) && (GUI_KEY_PRESSED(KEY_DELETE) || (GUI_KEY_DOWN(KEY_DELETE) && autoCursorShouldTrigger)))
{
// Delete single codepoint from text, after current cursor position
@ -2768,7 +2767,6 @@ int GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
textLength -= accCodepointSize;
textBoxCursorIndex -= accCodepointSize;
}
else if ((textBoxCursorIndex > 0) && (GUI_KEY_PRESSED(KEY_BACKSPACE) || (GUI_KEY_DOWN(KEY_BACKSPACE) && autoCursorShouldTrigger)))
{
// Delete single codepoint from text, before current cursor position
@ -5393,7 +5391,8 @@ static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, C
}
if (wrapMode == TEXT_WRAP_NONE) posOffsetY += (float)(GuiGetStyle(DEFAULT, TEXT_SIZE) + GuiGetStyle(DEFAULT, TEXT_LINE_SPACING));
else if ((wrapMode == TEXT_WRAP_CHAR) || (wrapMode == TEXT_WRAP_WORD)) posOffsetY += (textOffsetY + (float)GuiGetStyle(DEFAULT, TEXT_LINE_SPACING));
else if ((wrapMode == TEXT_WRAP_CHAR) || (wrapMode == TEXT_WRAP_WORD))
posOffsetY += (textOffsetY + GuiGetStyle(DEFAULT, TEXT_SIZE));
//---------------------------------------------------------------------------------
}