mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Don't show next/previous page options if only one page
It's possible to get one page of levels by removing all the built-ins, either by removing them directly from data.zip or by putting files with the same filenames as them in your level folder that don't contain nothing. And hey, there's already a check for if no levels exist at all, so why not check for this too?
This commit is contained in:
@@ -412,12 +412,14 @@ static void menuactionpress(void)
|
||||
break;
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
case Menu::levellist:
|
||||
{
|
||||
const bool nextlastoptions = ed.ListOfMetaData.size() > 8;
|
||||
if(game.currentmenuoption==(int)game.menuoptions.size()-1){
|
||||
//go back to menu
|
||||
music.playef(11);
|
||||
game.returnmenu();
|
||||
map.nexttowercolour();
|
||||
}else if(game.currentmenuoption==(int)game.menuoptions.size()-2){
|
||||
}else if(nextlastoptions && game.currentmenuoption==(int)game.menuoptions.size()-2){
|
||||
//previous page
|
||||
music.playef(11);
|
||||
if(game.levelpage==0){
|
||||
@@ -428,7 +430,7 @@ static void menuactionpress(void)
|
||||
game.createmenu(Menu::levellist, true);
|
||||
game.currentmenuoption=game.menuoptions.size()-2;
|
||||
map.nexttowercolour();
|
||||
}else if(game.currentmenuoption==(int)game.menuoptions.size()-3){
|
||||
}else if(nextlastoptions && game.currentmenuoption==(int)game.menuoptions.size()-3){
|
||||
//next page
|
||||
music.playef(11);
|
||||
if((size_t) ((game.levelpage*8)+8) >= ed.ListOfMetaData.size()){
|
||||
@@ -457,6 +459,7 @@ static void menuactionpress(void)
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case Menu::quickloadlevel:
|
||||
switch (game.currentmenuoption)
|
||||
|
||||
Reference in New Issue
Block a user