Fix incorrect menu behavior when quitting/restarting

Only consider `STATE_ONLINE` and `STATE_DEMOPLAYBACK` as ingame.

Closes #7178.
This commit is contained in:
Robert Müller 2023-10-26 21:19:09 +02:00
parent 7312721743
commit 68e481945b
3 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -982,7 +982,7 @@ int CMenus::Render()
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;

View file

@ -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();
}