5761: Replace `POPUP_PURE` with generic `PopupMessage` r=def- a=Robyt3

Minor refactoring, as the popup just shows generic text with an Ok-button.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
This commit is contained in:
bors[bot] 2022-08-21 15:02:55 +00:00 committed by GitHub
commit d2523d9053
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View file

@ -1510,13 +1510,6 @@ int CMenus::Render()
}
ExtraAlign = 0;
}
else if(m_Popup == POPUP_PURE)
{
pTitle = Localize("Disconnected");
pExtraText = Localize("The server is running a non-standard tuning on a pure game type.");
pButtonText = Localize("Ok");
ExtraAlign = -1;
}
else if(m_Popup == POPUP_DELETE_DEMO)
{
pTitle = Localize("Delete demo");
@ -2528,7 +2521,7 @@ void CMenus::OnRender()
{
Client()->Disconnect();
SetActive(true);
m_Popup = POPUP_PURE;
PopupMessage(Localize("Disconnected"), Localize("The server is running a non-standard tuning on a pure game type."), Localize("Ok"));
}
if(!IsActive())

View file

@ -684,7 +684,6 @@ public:
POPUP_CONNECTING,
POPUP_MESSAGE,
POPUP_DISCONNECTED,
POPUP_PURE,
POPUP_LANGUAGE,
POPUP_COUNTRY,
POPUP_DELETE_DEMO,