From 3d079a35e9f058ee80c39c9ac204c57e042aad6e Mon Sep 17 00:00:00 2001 From: oy Date: Thu, 3 Jun 2010 23:32:32 +0200 Subject: [PATCH] fixed bug with the quick search box. Closes #89 --- src/game/client/components/menus_browser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index 8d9b11cfd..9b816f155 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -357,9 +357,10 @@ void CMenus::RenderServerbrowserServerList(CUIRect View) Status.VSplitLeft(260.0f, &QuickSearch, &Status); const char *pLabel = Localize("Quick search:"); UI()->DoLabel(&QuickSearch, pLabel, 12.0f, -1); - QuickSearch.VSplitLeft(TextRender()->TextWidth(0, 12.0f, pLabel, -1), 0, &QuickSearch); + float w = TextRender()->TextWidth(0, 12.0f, pLabel, -1); + QuickSearch.VSplitLeft(w, 0, &QuickSearch); QuickSearch.VSplitLeft(5.0f, 0, &QuickSearch); - QuickSearch.VSplitLeft(155.0f, &QuickSearch, &Button); + QuickSearch.VSplitLeft(260.0f-w-22.0f, &QuickSearch, &Button); static float Offset = 0.0f; DoEditBox(&g_Config.m_BrFilterString, &QuickSearch, g_Config.m_BrFilterString, sizeof(g_Config.m_BrFilterString), 12.0f, &Offset, false, CUI::CORNER_L); // clear button