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:
Misa
2021-08-11 19:48:40 -07:00
committed by Ethan Lee
parent 254cede905
commit 28e4a155d4
3 changed files with 24 additions and 17 deletions

View File

@@ -173,8 +173,9 @@ static void menurender(void)
}
int tmp=game.currentmenuoption+(game.levelpage*8);
if(INBOUNDS_VEC(tmp, ed.ListOfMetaData)){
const bool nextlastoptions = ed.ListOfMetaData.size() > 8;
//Don't show next/previous page or return to menu options here!
if(game.menuoptions.size() - game.currentmenuoption<=3){
if(nextlastoptions && game.menuoptions.size() - game.currentmenuoption<=3){
}else{
graphics.bigprint( -1, 15, ed.ListOfMetaData[tmp].title, tr, tg, tb, true);