Update raygui.h

This commit is contained in:
Ray 2023-05-31 18:47:49 +02:00
parent 5e77b2ca6f
commit 3c5b5121bc

View File

@ -2394,7 +2394,7 @@ int GuiTextBox(Rectangle bounds, char *text, int bufferSize, bool editMode)
if (IsKeyPressed(KEY_LEFT) || (autoCursorDelayCounter%RAYGUI_TEXTBOX_AUTO_CURSOR_DELAY) == 0) // Delay every movement some frames if (IsKeyPressed(KEY_LEFT) || (autoCursorDelayCounter%RAYGUI_TEXTBOX_AUTO_CURSOR_DELAY) == 0) // Delay every movement some frames
{ {
unsigned int prevCodepointSize = 0; int prevCodepointSize = 0;
GetCodepointPrevious(text + textBoxCursorIndex, &prevCodepointSize); GetCodepointPrevious(text + textBoxCursorIndex, &prevCodepointSize);
if (textBoxCursorIndex >= prevCodepointSize) textBoxCursorIndex -= prevCodepointSize; if (textBoxCursorIndex >= prevCodepointSize) textBoxCursorIndex -= prevCodepointSize;