mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03: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:
@@ -6955,25 +6955,11 @@ void Game::createmenu( std::string t )
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (t == "unlocktimetrial" || t == "unlocktimetrials")
|
||||
{
|
||||
option("continue");
|
||||
menuxoff = 20;
|
||||
menuyoff = 70;
|
||||
}
|
||||
else if (t == "unlocknodeathmode")
|
||||
{
|
||||
option("continue");
|
||||
menuxoff = 20;
|
||||
menuyoff = 70;
|
||||
}
|
||||
else if (t == "unlockintermission")
|
||||
{
|
||||
option("continue");
|
||||
menuxoff = 20;
|
||||
menuyoff = 70;
|
||||
}
|
||||
else if (t == "unlockflipmode")
|
||||
else if (t == "unlocktimetrial"
|
||||
|| t == "unlocktimetrials"
|
||||
|| t == "unlocknodeathmode"
|
||||
|| t == "unlockintermission"
|
||||
|| t == "unlockflipmode")
|
||||
{
|
||||
option("continue");
|
||||
menuxoff = 20;
|
||||
|
||||
@@ -1343,14 +1343,10 @@ void menuactionpress()
|
||||
game.createmenu("mainmenu");
|
||||
map.nexttowercolour();
|
||||
}
|
||||
else if (game.currentmenuname == "unlocktimetrials" || game.currentmenuname == "unlocktimetrial")
|
||||
{
|
||||
//back
|
||||
music.playef(11);
|
||||
game.createmenu("play");
|
||||
map.nexttowercolour();
|
||||
}
|
||||
else if (game.currentmenuname == "unlocknodeathmode" || game.currentmenuname == "unlockintermission"
|
||||
else if (game.currentmenuname == "unlocktimetrials"
|
||||
|| game.currentmenuname == "unlocktimetrial"
|
||||
|| game.currentmenuname == "unlocknodeathmode"
|
||||
|| game.currentmenuname == "unlockintermission"
|
||||
|| game.currentmenuname == "unlockflipmode")
|
||||
{
|
||||
//back
|
||||
|
||||
Reference in New Issue
Block a user