1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Add "open level folder" option to playerworlds menu

This simply adds another menu option utilizing what I added in the
previous commit.
This commit is contained in:
Misa 2020-04-17 18:50:10 -07:00 committed by Ethan Lee
parent 6847eb3a87
commit bc9013c228
2 changed files with 13 additions and 11 deletions

View file

@ -6636,7 +6636,7 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
#if !defined(NO_EDITOR)
option("level editor");
#endif
//option("open level folder");
option("open level folder", FILESYSTEM_openDirectoryEnabled());
option("back to menu");
menuxoff = -30;
menuyoff = -40;

View file

@ -285,17 +285,19 @@ void menuactionpress()
ed.filename="";
break;
#endif
/*case OFFSET+2:
music.playef(11);
//"OPENFOLDERHOOK"
//When the player selects the "open level folder" menu option,
//this is where it should run the appropriate code.
//This code should:
// - Minimise the game
// - Open the levels folder for whatever operating system we're on
SDL_assert(0 && "Remove open level dir");
break;*/
case OFFSET+2:
//"OPENFOLDERHOOK"
if (FILESYSTEM_openDirectory(FILESYSTEM_getUserLevelDirectory()))
{
music.playef(11);
SDL_MinimizeWindow(graphics.screenbuffer->m_window);
}
else
{
music.playef(2);
}
break;
case OFFSET+3:
//back
music.playef(11);
game.returnmenu();