mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Hide level path by default
You will now need to go through another confirm menu in order to print your level path. The confirm menu warns you may leak sensitive information if you are streaming. Screenshots: https://i.imgur.com/0Dc9jsZ.png https://i.imgur.com/UhDgXqj.png https://i.imgur.com/Z0ftQnH.png Fixes #853.
This commit is contained in:
parent
8ba1325d0f
commit
f7454baffa
4 changed files with 42 additions and 19 deletions
|
@ -5947,10 +5947,20 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
||||||
option("level editor");
|
option("level editor");
|
||||||
#endif
|
#endif
|
||||||
option("open level folder", FILESYSTEM_openDirectoryEnabled());
|
option("open level folder", FILESYSTEM_openDirectoryEnabled());
|
||||||
|
option("show level folder path");
|
||||||
option("back to menu");
|
option("back to menu");
|
||||||
menuyoff = -40;
|
menuyoff = -40;
|
||||||
maxspacing = 15;
|
maxspacing = 15;
|
||||||
break;
|
break;
|
||||||
|
case Menu::confirmshowlevelspath:
|
||||||
|
option("no, don't show me");
|
||||||
|
option("yes, reveal the path");
|
||||||
|
menuyoff = -10;
|
||||||
|
break;
|
||||||
|
case Menu::showlevelspath:
|
||||||
|
option("return to levels");
|
||||||
|
menuyoff = 60;
|
||||||
|
break;
|
||||||
case Menu::levellist:
|
case Menu::levellist:
|
||||||
if(cl.ListOfMetaData.size()==0)
|
if(cl.ListOfMetaData.size()==0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,6 +37,8 @@ namespace Menu
|
||||||
{
|
{
|
||||||
mainmenu,
|
mainmenu,
|
||||||
playerworlds,
|
playerworlds,
|
||||||
|
confirmshowlevelspath,
|
||||||
|
showlevelspath,
|
||||||
levellist,
|
levellist,
|
||||||
quickloadlevel,
|
quickloadlevel,
|
||||||
deletequicklevel,
|
deletequicklevel,
|
||||||
|
|
|
@ -567,6 +567,11 @@ static void menuactionpress(void)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OFFSET+3:
|
case OFFSET+3:
|
||||||
|
music.playef(11);
|
||||||
|
game.createmenu(Menu::confirmshowlevelspath);
|
||||||
|
map.nexttowercolour();
|
||||||
|
break;
|
||||||
|
case OFFSET+4:
|
||||||
//back
|
//back
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.returnmenu();
|
game.returnmenu();
|
||||||
|
@ -576,6 +581,23 @@ static void menuactionpress(void)
|
||||||
#undef OFFSET
|
#undef OFFSET
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
case Menu::confirmshowlevelspath:
|
||||||
|
{
|
||||||
|
int prevmenuoption = game.currentmenuoption; /* returnmenu destroys this */
|
||||||
|
music.playef(11);
|
||||||
|
game.returnmenu();
|
||||||
|
map.nexttowercolour();
|
||||||
|
if (prevmenuoption == 1)
|
||||||
|
{
|
||||||
|
game.createmenu(Menu::showlevelspath);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Menu::showlevelspath:
|
||||||
|
music.playef(11);
|
||||||
|
game.returntomenu(Menu::playerworlds);
|
||||||
|
map.nexttowercolour();
|
||||||
|
break;
|
||||||
case Menu::errornostart:
|
case Menu::errornostart:
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.createmenu(Menu::mainmenu);
|
game.createmenu(Menu::mainmenu);
|
||||||
|
|
|
@ -1367,26 +1367,15 @@ static void menurender(void)
|
||||||
graphics.Print( -1, 135, "the intermission levels.", tr, tg, tb, true);
|
graphics.Print( -1, 135, "the intermission levels.", tr, tg, tb, true);
|
||||||
break;
|
break;
|
||||||
case Menu::playerworlds:
|
case Menu::playerworlds:
|
||||||
{
|
graphics.PrintWrap(-1, 180, "To install new player levels, copy the .vvvvvv files to the levels folder.", tr, tg, tb, true, 10, 304);
|
||||||
std::string tempstring = FILESYSTEM_getUserLevelDirectory();
|
break;
|
||||||
if(tempstring.length()>80){
|
case Menu::confirmshowlevelspath:
|
||||||
graphics.Print( -1, 160, "To install new player levels, copy", tr, tg, tb, true);
|
graphics.PrintWrap(-1, 80, "Are you sure you want to show the levels path? This may reveal sensitive information if you are streaming.", tr, tg, tb, true, 10, 304);
|
||||||
graphics.Print( -1, 170, "the .vvvvvv files to this folder:", tr, tg, tb, true);
|
break;
|
||||||
graphics.Print( 320-((tempstring.length()-80)*8), 190, tempstring.substr(0,tempstring.length()-80), tr, tg, tb);
|
case Menu::showlevelspath:
|
||||||
graphics.Print( 0, 200, tempstring.substr(tempstring.length()-80,40), tr, tg, tb);
|
graphics.Print(-1, 40, "The levels path is:", tr, tg, tb, true);
|
||||||
graphics.Print( 0, 210, tempstring.substr(tempstring.length()-40,40), tr, tg, tb);
|
graphics.PrintWrap(0, 60, FILESYSTEM_getUserLevelDirectory(), tr, tg, tb, false, 10, 320);
|
||||||
}else if(tempstring.length()>40){
|
|
||||||
graphics.Print( -1, 170, "To install new player levels, copy", tr, tg, tb, true);
|
|
||||||
graphics.Print( -1, 180, "the .vvvvvv files to this folder:", tr, tg, tb, true);
|
|
||||||
graphics.Print( 320-((tempstring.length()-40)*8), 200, tempstring.substr(0,tempstring.length()-40), tr, tg, tb);
|
|
||||||
graphics.Print( 0, 210, tempstring.substr(tempstring.length()-40,40), tr, tg, tb);
|
|
||||||
}else{
|
|
||||||
graphics.Print( -1, 180, "To install new player levels, copy", tr, tg, tb, true);
|
|
||||||
graphics.Print( -1, 190, "the .vvvvvv files to this folder:", tr, tg, tb, true);
|
|
||||||
graphics.Print( 320-(tempstring.length()*8), 210, tempstring, tr, tg, tb);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case Menu::errorsavingsettings:
|
case Menu::errorsavingsettings:
|
||||||
graphics.Print( -1, 95, "ERROR: Could not save settings file!", tr, tg, tb, true);
|
graphics.Print( -1, 95, "ERROR: Could not save settings file!", tr, tg, tb, true);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue