1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01:00

De-duplicate "You have unlocked" menu input and options

They all have the same input handling and menu options, so condense them
into one block instead of duplicating the same block of code multiple
times.
This commit is contained in:
Misa 2020-04-15 12:16:53 -07:00 committed by Ethan Lee
parent 119d2ad25f
commit 1e3879b8fe
2 changed files with 10 additions and 28 deletions

View file

@ -6955,25 +6955,11 @@ void Game::createmenu( std::string t )
} }
} }
} }
else if (t == "unlocktimetrial" || t == "unlocktimetrials") else if (t == "unlocktimetrial"
{ || t == "unlocktimetrials"
option("continue"); || t == "unlocknodeathmode"
menuxoff = 20; || t == "unlockintermission"
menuyoff = 70; || t == "unlockflipmode")
}
else if (t == "unlocknodeathmode")
{
option("continue");
menuxoff = 20;
menuyoff = 70;
}
else if (t == "unlockintermission")
{
option("continue");
menuxoff = 20;
menuyoff = 70;
}
else if (t == "unlockflipmode")
{ {
option("continue"); option("continue");
menuxoff = 20; menuxoff = 20;

View file

@ -1343,14 +1343,10 @@ void menuactionpress()
game.createmenu("mainmenu"); game.createmenu("mainmenu");
map.nexttowercolour(); map.nexttowercolour();
} }
else if (game.currentmenuname == "unlocktimetrials" || game.currentmenuname == "unlocktimetrial") else if (game.currentmenuname == "unlocktimetrials"
{ || game.currentmenuname == "unlocktimetrial"
//back || game.currentmenuname == "unlocknodeathmode"
music.playef(11); || game.currentmenuname == "unlockintermission"
game.createmenu("play");
map.nexttowercolour();
}
else if (game.currentmenuname == "unlocknodeathmode" || game.currentmenuname == "unlockintermission"
|| game.currentmenuname == "unlockflipmode") || game.currentmenuname == "unlockflipmode")
{ {
//back //back