mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 22:18:19 +00:00
Merge pull request #7373 from Robyt3/Client-Quitting-State-Fixes
Fix incorrect menu behavior when quitting/restarting
This commit is contained in:
commit
c325f830e5
|
@ -323,7 +323,7 @@ bool CMenuBackground::Render()
|
|||
if(!m_Loaded)
|
||||
return false;
|
||||
|
||||
if(Client()->State() >= IClient::STATE_ONLINE)
|
||||
if(Client()->State() == IClient::STATE_ONLINE || Client()->State() == IClient::STATE_DEMOPLAYBACK)
|
||||
return false;
|
||||
|
||||
m_Camera.m_Zoom = 0.7f;
|
||||
|
|
|
@ -978,22 +978,11 @@ int CMenus::Render()
|
|||
else if(s_Frame == 1)
|
||||
{
|
||||
UpdateMusicState();
|
||||
s_Frame++;
|
||||
|
||||
RefreshBrowserTab(g_Config.m_UiPage);
|
||||
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)
|
||||
ServerBrowser()->Refresh(IServerBrowser::TYPE_DDNET);
|
||||
else if(g_Config.m_UiPage == PAGE_KOG)
|
||||
ServerBrowser()->Refresh(IServerBrowser::TYPE_KOG);
|
||||
s_Frame++;
|
||||
}
|
||||
|
||||
if(Client()->State() >= IClient::STATE_ONLINE)
|
||||
if(Client()->State() == IClient::STATE_ONLINE || Client()->State() == IClient::STATE_DEMOPLAYBACK)
|
||||
{
|
||||
ms_ColorTabbarInactive = ms_ColorTabbarInactiveIngame;
|
||||
ms_ColorTabbarActive = ms_ColorTabbarActiveIngame;
|
||||
|
|
|
@ -389,7 +389,7 @@ void CMenus::RefreshSkins()
|
|||
RenderLoading(Localize("Loading skin files"), "", 0, false);
|
||||
}
|
||||
});
|
||||
if(Client()->State() >= IClient::STATE_ONLINE)
|
||||
if(Client()->State() == IClient::STATE_ONLINE || Client()->State() == IClient::STATE_DEMOPLAYBACK)
|
||||
{
|
||||
m_pClient->RefindSkins();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue