mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
refresh serverbrowser when disconnecting / abort
This commit is contained in:
parent
f7c7852927
commit
e5f3943f6e
|
@ -1783,6 +1783,24 @@ int CMenus::Render()
|
|||
{
|
||||
Client()->Disconnect();
|
||||
m_Popup = POPUP_NONE;
|
||||
if(g_Config.m_UiPage == PAGE_INTERNET)
|
||||
ServerBrowser()->Refresh(IServerBrowser::TYPE_INTERNET);
|
||||
else if(g_Config.m_UiPage == PAGE_LAN)
|
||||
ServerBrowser()->Refresh(IServerBrowser::TYPE_LAN);
|
||||
else if(g_Config.m_UiPage == PAGE_FAVORITES)
|
||||
ServerBrowser()->Refresh(IServerBrowser::TYPE_FAVORITES);
|
||||
else if(g_Config.m_UiPage == PAGE_DDNET)
|
||||
{
|
||||
// start a new server list request
|
||||
Client()->RequestDDNetInfo();
|
||||
ServerBrowser()->Refresh(IServerBrowser::TYPE_DDNET);
|
||||
}
|
||||
else if(g_Config.m_UiPage == PAGE_KOG)
|
||||
{
|
||||
// start a new server list request
|
||||
Client()->RequestDDNetInfo();
|
||||
ServerBrowser()->Refresh(IServerBrowser::TYPE_KOG);
|
||||
}
|
||||
}
|
||||
|
||||
if(Client()->MapDownloadTotalsize() > 0)
|
||||
|
|
|
@ -61,6 +61,24 @@ void CMenus::RenderGame(CUIRect MainView)
|
|||
else
|
||||
{
|
||||
Client()->Disconnect();
|
||||
if(g_Config.m_UiPage == PAGE_INTERNET)
|
||||
ServerBrowser()->Refresh(IServerBrowser::TYPE_INTERNET);
|
||||
else if(g_Config.m_UiPage == PAGE_LAN)
|
||||
ServerBrowser()->Refresh(IServerBrowser::TYPE_LAN);
|
||||
else if(g_Config.m_UiPage == PAGE_FAVORITES)
|
||||
ServerBrowser()->Refresh(IServerBrowser::TYPE_FAVORITES);
|
||||
else if(g_Config.m_UiPage == PAGE_DDNET)
|
||||
{
|
||||
// start a new server list request
|
||||
Client()->RequestDDNetInfo();
|
||||
ServerBrowser()->Refresh(IServerBrowser::TYPE_DDNET);
|
||||
}
|
||||
else if(g_Config.m_UiPage == PAGE_KOG)
|
||||
{
|
||||
// start a new server list request
|
||||
Client()->RequestDDNetInfo();
|
||||
ServerBrowser()->Refresh(IServerBrowser::TYPE_KOG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue