1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59: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:
Misa 2020-04-16 23:37:49 -07:00 committed by Ethan Lee
parent 85b16b969a
commit 995dc3940a
2 changed files with 96 additions and 0 deletions

View file

@ -6837,42 +6837,49 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
break; break;
case Menu::credits: case Menu::credits:
option("next page"); option("next page");
option("last page");
option("return"); option("return");
menuxoff = 20; menuxoff = 20;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::credits2: case Menu::credits2:
option("next page"); option("next page");
option("previous page");
option("return"); option("return");
menuxoff = 20; menuxoff = 20;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::credits25: case Menu::credits25:
option("next page"); option("next page");
option("previous page");
option("return"); option("return");
menuxoff = 20; menuxoff = 20;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::credits3: case Menu::credits3:
option("next page"); option("next page");
option("previous page");
option("return"); option("return");
menuxoff = 20; menuxoff = 20;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::credits4: case Menu::credits4:
option("next page"); option("next page");
option("previous page");
option("return"); option("return");
menuxoff = 20; menuxoff = 20;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::credits5: case Menu::credits5:
option("next page"); option("next page");
option("previous page");
option("return"); option("return");
menuxoff = 20; menuxoff = 20;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::credits6: case Menu::credits6:
option("first page"); option("first page");
option("previous page");
option("return"); option("return");
menuxoff = 20; menuxoff = 20;
menuyoff = 64; menuyoff = 64;

View file

@ -701,6 +701,13 @@ void menuactionpress()
game.createmenu(Menu::credits2, true); game.createmenu(Menu::credits2, true);
map.nexttowercolour(); map.nexttowercolour();
break; break;
case 1:
//last page
music.playef(11);
game.createmenu(Menu::credits6, true);
game.currentmenuoption = 1;
map.nexttowercolour();
break;
default: default:
//back //back
music.playef(11); music.playef(11);
@ -719,6 +726,13 @@ void menuactionpress()
map.nexttowercolour(); map.nexttowercolour();
break; break;
case 1: case 1:
//previous page
music.playef(11);
game.createmenu(Menu::credits, true);
game.currentmenuoption = 1;
map.nexttowercolour();
break;
case 2:
//back //back
music.playef(11); music.playef(11);
game.returnmenu(); game.returnmenu();
@ -735,6 +749,13 @@ void menuactionpress()
game.createmenu(Menu::credits3, true); game.createmenu(Menu::credits3, true);
map.nexttowercolour(); map.nexttowercolour();
break; break;
case 1:
//previous page
music.playef(11);
game.createmenu(Menu::credits2, true);
game.currentmenuoption = 1;
map.nexttowercolour();
break;
default: default:
//back //back
music.playef(11); music.playef(11);
@ -763,6 +784,26 @@ void menuactionpress()
game.createmenu(Menu::credits3, true); 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(); map.nexttowercolour();
break; break;
default: default:
@ -794,6 +835,26 @@ void menuactionpress()
game.createmenu(Menu::credits4, true); 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(); map.nexttowercolour();
break; break;
default: default:
@ -825,6 +886,26 @@ void menuactionpress()
game.createmenu(Menu::credits5, true); 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(); map.nexttowercolour();
break; break;
default: default:
@ -845,6 +926,14 @@ void menuactionpress()
game.createmenu(Menu::credits, true); game.createmenu(Menu::credits, true);
map.nexttowercolour(); map.nexttowercolour();
break; 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: default:
//back //back
music.playef(11); music.playef(11);