From 8d65e0ac34c277186d4c7a58a9ed81c4a9d40177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Wed, 7 Jun 2023 18:10:42 +0200 Subject: [PATCH] Minor refactoring of settings menus - Use `IGraphics::CORNER_NONE` instead of `0`. - Remove redundant usage of `Localize` for an already localized string. - Remove redundant `HSplitBottom` with zero size. --- src/game/client/components/menus_browser.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index bdfb7941c..0e464ad97 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -617,7 +617,6 @@ void CMenus::RenderServerbrowserFilters(CUIRect View) { CUIRect ServerFilter = View, FilterHeader; const float FontSize = 12.0f; - ServerFilter.HSplitBottom(0.0f, &ServerFilter, 0); // server filter ServerFilter.HSplitTop(ms_ListheaderHeight, &FilterHeader, &ServerFilter); @@ -1109,7 +1108,7 @@ void CMenus::RenderServerbrowserServerDetail(CUIRect View) for(auto &Label : s_aLabels) { LeftColumn.HSplitTop(15.0f, &Row, &LeftColumn); - UI()->DoLabel(&Row, Localize(Label), FontSize, TEXTALIGN_ML); + UI()->DoLabel(&Row, Label, FontSize, TEXTALIGN_ML); } RightColumn.HSplitTop(15.0f, &Row, &RightColumn); @@ -1692,7 +1691,7 @@ void CMenus::RenderServerbrowser(CUIRect MainView) ToolboxPage = 0; static CButtonContainer s_InfoTab; - if(DoButton_MenuTab(&s_InfoTab, Localize("Info"), ToolboxPage == 1, &TabButton1, 0, NULL, NULL, NULL, NULL, 4.0f)) + if(DoButton_MenuTab(&s_InfoTab, Localize("Info"), ToolboxPage == 1, &TabButton1, IGraphics::CORNER_NONE, NULL, NULL, NULL, NULL, 4.0f)) ToolboxPage = 1; static CButtonContainer s_FriendsTab;