Add key binding for R to refresh serverbrowser

This commit is contained in:
def 2015-05-11 21:56:47 +02:00
parent b6008f5b20
commit db60bf6527
2 changed files with 2 additions and 1 deletions

View file

@ -937,7 +937,6 @@ int CMenus::Render()
TabBar.VMargin(20.0f, &TabBar); TabBar.VMargin(20.0f, &TabBar);
RenderMenubar(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)) 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); ServerBrowser()->Refresh(IServerBrowser::TYPE_INTERNET);

View file

@ -189,6 +189,8 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
else else
g_Config.m_UiToolboxPage = (g_Config.m_UiToolboxPage + 3 + 1) % 3; 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) if(NewIndex > -1 && NewIndex < NumServers)
{ {