diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 02d8f996..a7a10dd0 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -6690,6 +6690,14 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ ) { option("first page"); } + if (levelpage == 0) + { + option("last page"); + } + else + { + option("previous page"); + } option("return to menu"); menuxoff = -90; diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index cf0274a1..be6684d5 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1129,7 +1129,7 @@ void Graphics::drawlevelmenu( int cr, int cg, int cb, int division /*= 30*/ ) { if ((int) i == game.currentmenuoption) { - if(game.menuoptions.size()-i<=2){ + if(game.menuoptions.size()-i<=3){ //Draw it highlighted if (game.menuoptions[i].active) { @@ -1152,20 +1152,20 @@ void Graphics::drawlevelmenu( int cr, int cg, int cb, int division /*= 30*/ ) std::string tempstring = game.menuoptions[i].text; std::transform(tempstring.begin(), tempstring.end(),tempstring.begin(), ::toupper); tempstring = std::string("[ ") + tempstring + std::string(" ]"); - Print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb); + Print(110 + (i * division) - 16 +game.menuxoff, 144 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb); } else { std::string tempstring = game.menuoptions[i].text; tempstring = "[ " + tempstring + " ]"; //Draw it in gray - Print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128); + Print(110 + (i * division) - 16 +game.menuxoff, 144 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128); } } } else { - if(game.menuoptions.size()-i<=2){ + if(game.menuoptions.size()-i<=3){ //Draw it normally if (game.menuoptions[i].active) { @@ -1180,12 +1180,12 @@ void Graphics::drawlevelmenu( int cr, int cg, int cb, int division /*= 30*/ ) //Draw it normally if (game.menuoptions[i].active) { - Print(110 + (i * division) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i].text, cr, cg, cb); + Print(110 + (i * division) +game.menuxoff, 144 + (i * 12)+game.menuyoff, game.menuoptions[i].text, cr, cg, cb); } else { //Draw it in gray - Print(110 + (i * division) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i].text, 128, 128, 128); + Print(110 + (i * division) +game.menuxoff, 144 + (i * 12)+game.menuyoff, game.menuoptions[i].text, 128, 128, 128); } } } diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index 3853ab5a..2fb71da1 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -199,6 +199,17 @@ void menuactionpress() game.returnmenu(); map.nexttowercolour(); }else if(game.currentmenuoption==(int)game.menuoptions.size()-2){ + //previous page + music.playef(11); + if(game.levelpage==0){ + game.levelpage=(ed.ListOfMetaData.size()-1)/8; + }else{ + game.levelpage--; + } + game.createmenu(Menu::levellist, true); + game.currentmenuoption=game.menuoptions.size()-2; + map.nexttowercolour(); + }else if(game.currentmenuoption==(int)game.menuoptions.size()-3){ //next page music.playef(11); if((size_t) ((game.levelpage*8)+8) >= ed.ListOfMetaData.size()){ @@ -207,7 +218,7 @@ void menuactionpress() game.levelpage++; } game.createmenu(Menu::levellist, true); - game.currentmenuoption=game.menuoptions.size()-2; + game.currentmenuoption=game.menuoptions.size()-3; map.nexttowercolour(); }else{ //Ok, launch the level! diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index b7c11431..2ebe2a1a 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -46,8 +46,8 @@ void menurender() } int tmp=game.currentmenuoption+(game.levelpage*8); if(tmp>=0 && tmp < (int) ed.ListOfMetaData.size()){ // FIXME: size_t/int! -flibit - //Don't show next page or return to menu options here! - if(game.menuoptions.size() - game.currentmenuoption<=2){ + //Don't show next/previous page or return to menu options here! + if(game.menuoptions.size() - game.currentmenuoption<=3){ }else{ graphics.bigprint( -1, 15, ed.ListOfMetaData[tmp].title, tr, tg, tb, true);