From cfc4485f4b1b4f7ee16ab59cdc8964eda3b13d40 Mon Sep 17 00:00:00 2001 From: Jordy Ruiz Date: Fri, 16 Nov 2018 13:57:32 +0100 Subject: [PATCH] Reorder filter tabs to put friends last, adjust sizes to 30-30-40, from 25-25-50 (#1670 7/10) --- src/game/client/components/menus_browser.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index c8933fcba..a587e8e89 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -1341,20 +1341,21 @@ void CMenus::RenderServerbrowserSidebar(CUIRect View) // header View.HSplitTop(ms_ListheaderHeight, &Header, &View); - Header.VSplitLeft(Header.w/2, &Button, &Header); - static CButtonContainer s_TabFriends; - if(DoButton_SpriteID(&s_TabFriends, IMAGE_SIDEBARICONS, m_SidebarTab!=0?SPRITE_SIDEBAR_FRIEND_A:SPRITE_SIDEBAR_FRIEND_B, m_SidebarTab==0 , &Button, CUI::CORNER_TL, 5.0f, true)) + float Width = Header.w; + Header.VSplitLeft(Width*0.30f, &Button, &Header); + static CButtonContainer s_TabInfo; + if(DoButton_SpriteID(&s_TabInfo, IMAGE_SIDEBARICONS, m_SidebarTab!=0?SPRITE_SIDEBAR_INFO_A: SPRITE_SIDEBAR_INFO_B, m_SidebarTab==0 , &Button, CUI::CORNER_TL, 5.0f, true)) { m_SidebarTab = 0; } - Header.VSplitLeft(Header.w/2, &Button, &Header); + Header.VSplitLeft(Width*0.30f, &Button, &Header); static CButtonContainer s_TabFilter; if(DoButton_SpriteID(&s_TabFilter, IMAGE_SIDEBARICONS, m_SidebarTab!=1?SPRITE_SIDEBAR_FILTER_A: SPRITE_SIDEBAR_FILTER_B, m_SidebarTab==1, &Button, 0, 0.0f, true)) { m_SidebarTab = 1; } - static CButtonContainer s_TabInfo; - if(DoButton_SpriteID(&s_TabInfo, IMAGE_SIDEBARICONS, m_SidebarTab!=2?SPRITE_SIDEBAR_INFO_A: SPRITE_SIDEBAR_INFO_B, m_SidebarTab == 2, &Header, CUI::CORNER_TR, 5.0f, true)) + static CButtonContainer s_TabFriends; + if(DoButton_SpriteID(&s_TabFriends, IMAGE_SIDEBARICONS, m_SidebarTab!=2?SPRITE_SIDEBAR_FRIEND_A:SPRITE_SIDEBAR_FRIEND_B, m_SidebarTab == 2, &Header, CUI::CORNER_TR, 5.0f, true)) { m_SidebarTab = 2; } @@ -1363,13 +1364,13 @@ void CMenus::RenderServerbrowserSidebar(CUIRect View) switch(m_SidebarTab) { case 0: - RenderServerbrowserFriendTab(View); + RenderServerbrowserInfoTab(View); break; case 1: RenderServerbrowserFilterTab(View); break; case 2: - RenderServerbrowserInfoTab(View); + RenderServerbrowserFriendTab(View); } }