From 9991ba312d1474087add6000216e59f900204936 Mon Sep 17 00:00:00 2001 From: Kolyah35 Date: Tue, 10 Mar 2026 23:36:12 +0300 Subject: [PATCH] FIX: improve textbox --- src/client/gui/components/TextBox.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/gui/components/TextBox.cpp b/src/client/gui/components/TextBox.cpp index 2a05ba8..21f0d28 100755 --- a/src/client/gui/components/TextBox.cpp +++ b/src/client/gui/components/TextBox.cpp @@ -86,13 +86,15 @@ void TextBox::render(Minecraft* minecraft, int xm, int ym) { Gui::GuiScale * (height - 2) ); + int _y = y + (height - Font::DefaultLineHeight) / 2; + if (text.empty() && !focused) { - drawString(minecraft->font, hint, x + 2, y + 2, 0xff5e5e5e); + drawString(minecraft->font, hint, x + 2, _y, 0xff5e5e5e); } if (focused && blink) text.push_back('_'); - drawString(minecraft->font, text, x + 2, y + 2, 0xffffffff); + drawString(minecraft->font, text, x + 2, _y, 0xffffffff); if (focused && blink) text.pop_back();