mirror of
https://github.com/dborth/vbagx.git
synced 2025-02-19 20:12:45 +01:00
"Unsaved progress will be lost. Are you sure?" on Reset or exit game.
This commit is contained in:
parent
8451552bd7
commit
8f6b66091e
@ -1249,8 +1249,11 @@ static int MenuGame()
|
|||||||
}
|
}
|
||||||
else if(resetBtn.GetState() == STATE_CLICKED)
|
else if(resetBtn.GetState() == STATE_CLICKED)
|
||||||
{
|
{
|
||||||
emulator.emuReset();
|
if (WindowPrompt("Reset Game", "Usaved progress will be lost. Are you sure?", "OK", "Cancel"))
|
||||||
menu = MENU_EXIT;
|
{
|
||||||
|
emulator.emuReset();
|
||||||
|
menu = MENU_EXIT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(gameSettingsBtn.GetState() == STATE_CLICKED)
|
else if(gameSettingsBtn.GetState() == STATE_CLICKED)
|
||||||
{
|
{
|
||||||
@ -1258,22 +1261,25 @@ static int MenuGame()
|
|||||||
}
|
}
|
||||||
else if(mainmenuBtn.GetState() == STATE_CLICKED)
|
else if(mainmenuBtn.GetState() == STATE_CLICKED)
|
||||||
{
|
{
|
||||||
if(gameScreenImg)
|
if (WindowPrompt("Exit Game", "Usaved progress will be lost. Are you sure?", "OK", "Cancel"))
|
||||||
{
|
{
|
||||||
mainWindow->Remove(gameScreenImg);
|
if(gameScreenImg)
|
||||||
delete gameScreenImg;
|
{
|
||||||
gameScreenImg = NULL;
|
mainWindow->Remove(gameScreenImg);
|
||||||
}
|
delete gameScreenImg;
|
||||||
if(gameScreenTex)
|
gameScreenImg = NULL;
|
||||||
{
|
}
|
||||||
free(gameScreenTex);
|
if(gameScreenTex)
|
||||||
gameScreenTex = NULL;
|
{
|
||||||
}
|
free(gameScreenTex);
|
||||||
bgImg->SetVisible(true);
|
gameScreenTex = NULL;
|
||||||
#ifndef NO_SOUND
|
}
|
||||||
bgMusic->Play(); // startup music
|
bgImg->SetVisible(true);
|
||||||
#endif
|
#ifndef NO_SOUND
|
||||||
menu = MENU_GAMESELECTION;
|
bgMusic->Play(); // startup music
|
||||||
|
#endif
|
||||||
|
menu = MENU_GAMESELECTION;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(closeBtn.GetState() == STATE_CLICKED)
|
else if(closeBtn.GetState() == STATE_CLICKED)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user