Skip to content

Commit 407b924

Browse files
Fix: left_align text in GuiTextInputBox()
1 parent 947ef57 commit 407b924

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/raygui.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4197,6 +4197,9 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co
41974197
GuiSetStyle(LABEL, TEXT_ALIGNMENT, prevTextAlignment);
41984198
}
41994199

4200+
int prevTextBoxAlignment = GuiGetStyle(TEXTBOX, TEXT_ALIGNMENT);
4201+
GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);
4202+
42004203
if (secretViewActive != NULL)
42014204
{
42024205
static char stars[] = "****************";
@@ -4210,6 +4213,8 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co
42104213
if (GuiTextBox(textBoxBounds, text, textMaxSize, textEditMode)) textEditMode = !textEditMode;
42114214
}
42124215

4216+
GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, prevTextBoxAlignment);
4217+
42134218
int prevBtnTextAlignment = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
42144219
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
42154220

0 commit comments

Comments
 (0)