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

@@ -6002,21 +6002,24 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option(text);
}
}
if((size_t) ((levelpage*8)+8) <ed.ListOfMetaData.size())
if (ed.ListOfMetaData.size() > 8)
{
option("next page");
}
else
{
option("first page");
}
if (levelpage == 0)
{
option("last page");
}
else
{
option("previous page");
if((size_t) ((levelpage*8)+8) <ed.ListOfMetaData.size())
{
option("next page");
}
else
{
option("first page");
}
if (levelpage == 0)
{
option("last page");
}
else
{
option("previous page");
}
}
option("return to menu");