mirror of
https://github.com/raysan5/raygui.git
synced 2026-02-03 20:59:18 -05:00
Fix: left_align text in GuiTextInputBox() (#510)
This commit is contained in:
@ -4199,6 +4199,9 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co
|
|||||||
GuiSetStyle(LABEL, TEXT_ALIGNMENT, prevTextAlignment);
|
GuiSetStyle(LABEL, TEXT_ALIGNMENT, prevTextAlignment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int prevTextBoxAlignment = GuiGetStyle(TEXTBOX, TEXT_ALIGNMENT);
|
||||||
|
GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);
|
||||||
|
|
||||||
if (secretViewActive != NULL)
|
if (secretViewActive != NULL)
|
||||||
{
|
{
|
||||||
static char stars[] = "****************";
|
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;
|
if (GuiTextBox(textBoxBounds, text, textMaxSize, textEditMode)) textEditMode = !textEditMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, prevTextBoxAlignment);
|
||||||
|
|
||||||
int prevBtnTextAlignment = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
|
int prevBtnTextAlignment = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
|
||||||
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
|
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user