From 1c2365a20c9d45468a7cbd2716a58e94413e92ba Mon Sep 17 00:00:00 2001 From: Vincent-Dalstra <51883563+Vincent-Dalstra@users.noreply.github.com> Date: Thu, 29 Jan 2026 03:33:20 +0800 Subject: [PATCH] Fix: left_align text in GuiTextInputBox() (#510) --- src/raygui.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/raygui.h b/src/raygui.h index 00a126e..7d4a31f 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -4199,6 +4199,9 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co GuiSetStyle(LABEL, TEXT_ALIGNMENT, prevTextAlignment); } + int prevTextBoxAlignment = GuiGetStyle(TEXTBOX, TEXT_ALIGNMENT); + GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT); + if (secretViewActive != NULL) { static char stars[] = "****************"; @@ -4212,6 +4215,8 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co if (GuiTextBox(textBoxBounds, text, textMaxSize, textEditMode)) textEditMode = !textEditMode; } + GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, prevTextBoxAlignment); + int prevBtnTextAlignment = GuiGetStyle(BUTTON, TEXT_ALIGNMENT); GuiSetStyle(BUTTON, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);