diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 0264f3d4..c9793ed8 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -6002,21 +6002,24 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ ) option(text); } } - if((size_t) ((levelpage*8)+8) 8) { - option("next page"); - } - else - { - option("first page"); - } - if (levelpage == 0) - { - option("last page"); - } - else - { - option("previous page"); + if((size_t) ((levelpage*8)+8) 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) diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index 1f08eb3c..420e7508 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -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);