mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #3015
3015: Allow quitting instantly with SDL_QUIT when non-warning dialog showing r=Jupeyy a=def- Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
commit
ecb5e4c790
|
@ -253,6 +253,7 @@ public:
|
|||
virtual void OnDummyDisconnect() = 0;
|
||||
virtual void Echo(const char *pString) = 0;
|
||||
virtual bool CanDisplayWarning() = 0;
|
||||
virtual bool IsDisplayingWarning() = 0;
|
||||
};
|
||||
|
||||
extern IGameClient *CreateGameClient();
|
||||
|
|
|
@ -3327,7 +3327,7 @@ void CClient::Run()
|
|||
s_SavedConfig = true;
|
||||
}
|
||||
|
||||
if(m_Warnings.empty() && GameClient()->CanDisplayWarning())
|
||||
if(m_Warnings.empty() && !GameClient()->IsDisplayingWarning())
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -2705,3 +2705,8 @@ bool CGameClient::CanDisplayWarning()
|
|||
{
|
||||
return m_pMenus->CanDisplayWarning();
|
||||
}
|
||||
|
||||
bool CGameClient::IsDisplayingWarning()
|
||||
{
|
||||
return m_pMenus->GetCurPopup() == CMenus::POPUP_WARNING;
|
||||
}
|
||||
|
|
|
@ -450,6 +450,7 @@ public:
|
|||
void Echo(const char *pString);
|
||||
bool IsOtherTeam(int ClientID);
|
||||
bool CanDisplayWarning();
|
||||
bool IsDisplayingWarning();
|
||||
|
||||
void LoadGameSkin(const char *pPath, bool AsDir = false);
|
||||
void LoadEmoticonsSkin(const char *pPath, bool AsDir = false);
|
||||
|
|
Loading…
Reference in a new issue