mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +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)
|
if(!m_Loaded)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(Client()->State() >= IClient::STATE_ONLINE)
|
if(Client()->State() == IClient::STATE_ONLINE || Client()->State() == IClient::STATE_DEMOPLAYBACK)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_Camera.m_Zoom = 0.7f;
|
m_Camera.m_Zoom = 0.7f;
|
||||||
|
|
|
@ -978,22 +978,11 @@ int CMenus::Render()
|
||||||
else if(s_Frame == 1)
|
else if(s_Frame == 1)
|
||||||
{
|
{
|
||||||
UpdateMusicState();
|
UpdateMusicState();
|
||||||
s_Frame++;
|
|
||||||
|
|
||||||
RefreshBrowserTab(g_Config.m_UiPage);
|
RefreshBrowserTab(g_Config.m_UiPage);
|
||||||
if(g_Config.m_UiPage == PAGE_INTERNET)
|
s_Frame++;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Client()->State() >= IClient::STATE_ONLINE)
|
if(Client()->State() == IClient::STATE_ONLINE || Client()->State() == IClient::STATE_DEMOPLAYBACK)
|
||||||
{
|
{
|
||||||
ms_ColorTabbarInactive = ms_ColorTabbarInactiveIngame;
|
ms_ColorTabbarInactive = ms_ColorTabbarInactiveIngame;
|
||||||
ms_ColorTabbarActive = ms_ColorTabbarActiveIngame;
|
ms_ColorTabbarActive = ms_ColorTabbarActiveIngame;
|
||||||
|
|
|
@ -389,7 +389,7 @@ void CMenus::RefreshSkins()
|
||||||
RenderLoading(Localize("Loading skin files"), "", 0, false);
|
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();
|
m_pClient->RefindSkins();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue