1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-17 01:58:29 +02:00

Add start of better Esc menu

It's not functional yet, but here are the options:

    return to game
        quit to menu
            graphic options
                game options
This commit is contained in:
Misa 2020-06-22 15:24:18 -07:00 committed by Ethan Lee
parent a402c990bf
commit 92154f4be1
2 changed files with 25 additions and 2 deletions

View File

@ -1744,7 +1744,7 @@ void gameinput()
game.gamestate = MAPMODE;
game.gamesaved = false;
graphics.resumegamemode = false;
game.menupage = 10; // The Map Page
game.menupage = 30; // Pause screen
BlitSurfaceStandard(graphics.menubuffer,NULL,graphics.backBuffer, NULL);
graphics.menuoffset = 240; //actually this should count the roomname
@ -1924,7 +1924,7 @@ void mapinput()
if (key.isDown(27))
{
game.mapheld = true;
game.menupage = 10;
game.menupage = 30;
}
}
else
@ -2066,6 +2066,8 @@ void mapinput()
if (game.menupage == 19) game.menupage = 21;
if (game.menupage == 22) game.menupage = 20;
if (game.menupage == 29) game.menupage = 33;
if (game.menupage == 34) game.menupage = 30;
}
}

View File

@ -1685,6 +1685,27 @@ void maprender()
#undef TAB
}
// Draw menu header
switch (game.menupage)
{
case 30:
case 31:
case 32:
case 33:
graphics.Print(-1, 220, "[ PAUSE ]", 196, 196, 255 - help.glow, true);
}
// Draw menu options
if (game.menupage >= 30 && game.menupage <= 33)
{
#define OPTION(opt, text) graphics.map_option(opt, 4, text, game.menupage - 30 == opt)
OPTION(0, "return to game");
OPTION(1, "quit to menu");
OPTION(2, "graphic options");
OPTION(3, "game options");
#undef OPTION
}
// Draw the actual menu
switch(game.menupage)
{