mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Add a "previous page" option to the credits menu
The credits aren't super-long, but it's still nice to have this menu option. If it's the first page, "previous page" will be "last page" instead.
This commit is contained in:
parent
85b16b969a
commit
995dc3940a
2 changed files with 96 additions and 0 deletions
|
@ -6837,42 +6837,49 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
|||
break;
|
||||
case Menu::credits:
|
||||
option("next page");
|
||||
option("last page");
|
||||
option("return");
|
||||
menuxoff = 20;
|
||||
menuyoff = 64;
|
||||
break;
|
||||
case Menu::credits2:
|
||||
option("next page");
|
||||
option("previous page");
|
||||
option("return");
|
||||
menuxoff = 20;
|
||||
menuyoff = 64;
|
||||
break;
|
||||
case Menu::credits25:
|
||||
option("next page");
|
||||
option("previous page");
|
||||
option("return");
|
||||
menuxoff = 20;
|
||||
menuyoff = 64;
|
||||
break;
|
||||
case Menu::credits3:
|
||||
option("next page");
|
||||
option("previous page");
|
||||
option("return");
|
||||
menuxoff = 20;
|
||||
menuyoff = 64;
|
||||
break;
|
||||
case Menu::credits4:
|
||||
option("next page");
|
||||
option("previous page");
|
||||
option("return");
|
||||
menuxoff = 20;
|
||||
menuyoff = 64;
|
||||
break;
|
||||
case Menu::credits5:
|
||||
option("next page");
|
||||
option("previous page");
|
||||
option("return");
|
||||
menuxoff = 20;
|
||||
menuyoff = 64;
|
||||
break;
|
||||
case Menu::credits6:
|
||||
option("first page");
|
||||
option("previous page");
|
||||
option("return");
|
||||
menuxoff = 20;
|
||||
menuyoff = 64;
|
||||
|
|
|
@ -701,6 +701,13 @@ void menuactionpress()
|
|||
game.createmenu(Menu::credits2, true);
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 1:
|
||||
//last page
|
||||
music.playef(11);
|
||||
game.createmenu(Menu::credits6, true);
|
||||
game.currentmenuoption = 1;
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
default:
|
||||
//back
|
||||
music.playef(11);
|
||||
|
@ -719,6 +726,13 @@ void menuactionpress()
|
|||
map.nexttowercolour();
|
||||
break;
|
||||
case 1:
|
||||
//previous page
|
||||
music.playef(11);
|
||||
game.createmenu(Menu::credits, true);
|
||||
game.currentmenuoption = 1;
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 2:
|
||||
//back
|
||||
music.playef(11);
|
||||
game.returnmenu();
|
||||
|
@ -735,6 +749,13 @@ void menuactionpress()
|
|||
game.createmenu(Menu::credits3, true);
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 1:
|
||||
//previous page
|
||||
music.playef(11);
|
||||
game.createmenu(Menu::credits2, true);
|
||||
game.currentmenuoption = 1;
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
default:
|
||||
//back
|
||||
music.playef(11);
|
||||
|
@ -763,6 +784,26 @@ void menuactionpress()
|
|||
game.createmenu(Menu::credits3, true);
|
||||
}
|
||||
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 1:
|
||||
//previous page
|
||||
music.playef(11);
|
||||
game.current_credits_list_index -= 9;
|
||||
|
||||
if (game.current_credits_list_index < 0)
|
||||
{
|
||||
//No more super patrons. Move to the previous credits section
|
||||
game.current_credits_list_index = 0;
|
||||
game.createmenu(Menu::credits25, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//There are more super patrons. Refresh the menu with the next ones
|
||||
game.createmenu(Menu::credits3, true);
|
||||
}
|
||||
game.currentmenuoption = 1;
|
||||
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
default:
|
||||
|
@ -794,6 +835,26 @@ void menuactionpress()
|
|||
game.createmenu(Menu::credits4, true);
|
||||
}
|
||||
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 1:
|
||||
//previous page
|
||||
music.playef(11);
|
||||
game.current_credits_list_index -= 14;
|
||||
|
||||
if (game.current_credits_list_index < 0)
|
||||
{
|
||||
//No more patrons. Move to the previous credits section
|
||||
game.current_credits_list_index = game.superpatrons.size() - 1 - (game.superpatrons.size()-1)%9;
|
||||
game.createmenu(Menu::credits3, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//There are more patrons. Refresh the menu with the next ones
|
||||
game.createmenu(Menu::credits4, true);
|
||||
}
|
||||
game.currentmenuoption = 1;
|
||||
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
default:
|
||||
|
@ -825,6 +886,26 @@ void menuactionpress()
|
|||
game.createmenu(Menu::credits5, true);
|
||||
}
|
||||
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 1:
|
||||
//previous page
|
||||
music.playef(11);
|
||||
game.current_credits_list_index -= 9;
|
||||
|
||||
if (game.current_credits_list_index < 0)
|
||||
{
|
||||
//No more GitHub contributors. Move to the previous credits section
|
||||
game.current_credits_list_index = game.patrons.size() - 1 - (game.patrons.size()-1)%14;
|
||||
game.createmenu(Menu::credits4, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//There are more GitHub contributors. Refresh the menu with the next ones
|
||||
game.createmenu(Menu::credits5, true);
|
||||
}
|
||||
game.currentmenuoption = 1;
|
||||
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
default:
|
||||
|
@ -845,6 +926,14 @@ void menuactionpress()
|
|||
game.createmenu(Menu::credits, true);
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 1:
|
||||
//previous page
|
||||
music.playef(11);
|
||||
game.current_credits_list_index = game.githubfriends.size() - 1 - (game.githubfriends.size()-1)%9;
|
||||
game.createmenu(Menu::credits5, true);
|
||||
game.currentmenuoption = 1;
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
default:
|
||||
//back
|
||||
music.playef(11);
|
||||
|
|
Loading…
Reference in a new issue