From db60bf6527adcb1b6a557701e5cd09de19347eb0 Mon Sep 17 00:00:00 2001 From: def Date: Mon, 11 May 2015 21:56:47 +0200 Subject: [PATCH] Add key binding for R to refresh serverbrowser --- src/game/client/components/menus.cpp | 1 - src/game/client/components/menus_browser.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index aa695c329..c692d048f 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -937,7 +937,6 @@ int CMenus::Render() TabBar.VMargin(20.0f, &TabBar); RenderMenubar(TabBar); - // news is not implemented yet if(g_Config.m_UiPage < PAGE_NEWS || g_Config.m_UiPage > PAGE_SETTINGS || (Client()->State() == IClient::STATE_OFFLINE && g_Config.m_UiPage >= PAGE_GAME && g_Config.m_UiPage <= PAGE_CALLVOTE)) { ServerBrowser()->Refresh(IServerBrowser::TYPE_INTERNET); diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index 95afd353f..c72bcb2b6 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -189,6 +189,8 @@ void CMenus::RenderServerbrowserServerList(CUIRect View) else g_Config.m_UiToolboxPage = (g_Config.m_UiToolboxPage + 3 + 1) % 3; } + if(m_aInputEvents[i].m_Key == 'r') + ServerBrowser()->Refresh(ServerBrowser()->GetCurrentType()); } if(NewIndex > -1 && NewIndex < NumServers) {