1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2025-02-01 21:55:01 +01:00

Merge pull request #322 from Dav999-v/auto-center-menu

Make menus automatically centered and narrowed
This commit is contained in:
Ethan Lee 2020-06-29 19:10:39 -04:00 committed by GitHub
commit 38a42b484d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 52 additions and 82 deletions

View file

@ -6980,8 +6980,8 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
currentmenuoption = 0; currentmenuoption = 0;
currentmenuname = t; currentmenuname = t;
menuxoff = 0;
menuyoff = 0; menuyoff = 0;
int maxspacing = 30; // maximum value for menuspacing, can only become lower.
menucountdown = 0; menucountdown = 0;
menuoptions.clear(); menuoptions.clear();
@ -7000,8 +7000,8 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("view credits"); option("view credits");
#endif #endif
option("quit game"); option("quit game");
menuxoff = -16;
menuyoff = -10; menuyoff = -10;
maxspacing = 15;
break; break;
#if !defined(NO_CUSTOM_LEVELS) #if !defined(NO_CUSTOM_LEVELS)
case Menu::playerworlds: case Menu::playerworlds:
@ -7011,14 +7011,13 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
#endif #endif
option("open level folder", FILESYSTEM_openDirectoryEnabled()); option("open level folder", FILESYSTEM_openDirectoryEnabled());
option("back to menu"); option("back to menu");
menuxoff = -30;
menuyoff = -40; menuyoff = -40;
maxspacing = 15;
break; break;
case Menu::levellist: case Menu::levellist:
if(ed.ListOfMetaData.size()==0) if(ed.ListOfMetaData.size()==0)
{ {
option("ok"); option("ok");
menuxoff = 0;
menuyoff = -20; menuyoff = -20;
} }
else else
@ -7079,8 +7078,10 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
} }
option("return to menu"); option("return to menu");
menuxoff = -90; menuxoff = 20;
menuyoff = 70-(menuoptions.size()*10); menuyoff = 70-(menuoptions.size()*10);
menuspacing = 5;
return; // skip automatic centering, will turn out bad with levels list
} }
break; break;
#endif #endif
@ -7088,18 +7089,15 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("continue from save"); option("continue from save");
option("start from beginning"); option("start from beginning");
option("back to levels"); option("back to levels");
menuxoff = -40;
menuyoff = -30; menuyoff = -30;
break; break;
case Menu::youwannaquit: case Menu::youwannaquit:
option("yes, quit"); option("yes, quit");
option("no, return"); option("no, return");
menuxoff = 0;
menuyoff = -20; menuyoff = -20;
break; break;
case Menu::errornostart: case Menu::errornostart:
option("ok"); option("ok");
menuxoff = 0;
menuyoff = -20; menuyoff = -20;
break; break;
case Menu::graphicoptions: case Menu::graphicoptions:
@ -7111,7 +7109,6 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("toggle fps"); option("toggle fps");
option("toggle vsync"); option("toggle vsync");
option("return"); option("return");
menuxoff = -85;
menuyoff = 0; menuyoff = 0;
break; break;
case Menu::ed_settings: case Menu::ed_settings:
@ -7123,8 +7120,8 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("save level"); option("save level");
option("quit to main menu"); option("quit to main menu");
menuxoff = -46;
menuyoff = -20; menuyoff = -20;
maxspacing = 15;
break; break;
case Menu::ed_desc: case Menu::ed_desc:
option("change name"); option("change name");
@ -7133,21 +7130,21 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("change website"); option("change website");
option("back to settings"); option("back to settings");
menuxoff = -40;
menuyoff = 6; menuyoff = 6;
maxspacing = 15;
break; break;
case Menu::ed_music: case Menu::ed_music:
option("next song"); option("next song");
option("back"); option("back");
menuxoff = -10;
menuyoff = 16; menuyoff = 16;
maxspacing = 15;
break; break;
case Menu::ed_quit: case Menu::ed_quit:
option("yes, save and quit"); option("yes, save and quit");
option("no, quit without saving"); option("no, quit without saving");
option("return to editor"); option("return to editor");
menuxoff = -50;
menuyoff = 8; menuyoff = 8;
maxspacing = 15;
break; break;
case Menu::options: case Menu::options:
option("accessibility options"); option("accessibility options");
@ -7163,7 +7160,6 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
} }
option("return"); option("return");
menuxoff = -50;
menuyoff = 0; menuyoff = 0;
break; break;
case Menu::accessibility: case Menu::accessibility:
@ -7175,7 +7171,6 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("load screen"); option("load screen");
option("room name bg"); option("room name bg");
option("return"); option("return");
menuxoff = -85;
menuyoff = -10; menuyoff = -10;
break; break;
case Menu::controller: case Menu::controller:
@ -7184,19 +7179,16 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("bind enter"); option("bind enter");
option("bind menu"); option("bind menu");
option("return"); option("return");
menuxoff = -40;
menuyoff = 10; menuyoff = 10;
break; break;
case Menu::cleardatamenu: case Menu::cleardatamenu:
option("no! don't delete"); option("no! don't delete");
option("yes, delete everything"); option("yes, delete everything");
menuxoff = -30;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::setinvincibility: case Menu::setinvincibility:
option("no, return to options"); option("no, return to options");
option("yes, enable"); option("yes, enable");
menuxoff = -30;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::setslowdown: case Menu::setslowdown:
@ -7204,7 +7196,6 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("80% speed"); option("80% speed");
option("60% speed"); option("60% speed");
option("40% speed"); option("40% speed");
menuxoff = -40;
menuyoff = 16; menuyoff = 16;
break; break;
case Menu::unlockmenu: case Menu::unlockmenu:
@ -7215,56 +7206,48 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("unlock ship jukebox", (stat_trinkets<20)); option("unlock ship jukebox", (stat_trinkets<20));
option("unlock secret lab", !unlock[8]); option("unlock secret lab", !unlock[8]);
option("return"); option("return");
menuxoff = -70;
menuyoff = -20; menuyoff = -20;
break; break;
case Menu::credits: case Menu::credits:
option("next page"); option("next page");
option("last page"); option("last page");
option("return"); option("return");
menuxoff = 20;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::credits2: case Menu::credits2:
option("next page"); option("next page");
option("previous page"); option("previous page");
option("return"); option("return");
menuxoff = 20;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::credits25: case Menu::credits25:
option("next page"); option("next page");
option("previous page"); option("previous page");
option("return"); option("return");
menuxoff = 20;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::credits3: case Menu::credits3:
option("next page"); option("next page");
option("previous page"); option("previous page");
option("return"); option("return");
menuxoff = 20;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::credits4: case Menu::credits4:
option("next page"); option("next page");
option("previous page"); option("previous page");
option("return"); option("return");
menuxoff = 20;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::credits5: case Menu::credits5:
option("next page"); option("next page");
option("previous page"); option("previous page");
option("return"); option("return");
menuxoff = 20;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::credits6: case Menu::credits6:
option("first page"); option("first page");
option("previous page"); option("previous page");
option("return"); option("return");
menuxoff = 20;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::play: case Menu::play:
@ -7380,12 +7363,10 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("return"); option("return");
if (unlock[8]) if (unlock[8])
{ {
menuxoff = -40;
menuyoff = -30; menuyoff = -30;
} }
else else
{ {
menuxoff = -20;
menuyoff = -40; menuyoff = -40;
} }
} }
@ -7398,13 +7379,11 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
case Menu::unlockintermission: case Menu::unlockintermission:
case Menu::unlockflipmode: case Menu::unlockflipmode:
option("continue"); option("continue");
menuxoff = 20;
menuyoff = 70; menuyoff = 70;
break; break;
case Menu::newgamewarning: case Menu::newgamewarning:
option("start new game"); option("start new game");
option("return to menu"); option("return to menu");
menuxoff = -30;
menuyoff = 64; menuyoff = 64;
break; break;
case Menu::playmodes: case Menu::playmodes:
@ -7413,14 +7392,13 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("no death mode", unlock[17] && !map.invincibility && slowdown == 30); option("no death mode", unlock[17] && !map.invincibility && slowdown == 30);
option("flip mode", unlock[18]); option("flip mode", unlock[18]);
option("return to play menu"); option("return to play menu");
menuxoff = -70;
menuyoff = 8; menuyoff = 8;
maxspacing = 20;
break; break;
case Menu::intermissionmenu: case Menu::intermissionmenu:
option("play intermission 1"); option("play intermission 1");
option("play intermission 2"); option("play intermission 2");
option("return to play menu"); option("return to play menu");
menuxoff = -50;
menuyoff = -35; menuyoff = -35;
break; break;
case Menu::playint1: case Menu::playint1:
@ -7429,7 +7407,6 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("Verdigris"); option("Verdigris");
option("Victoria"); option("Victoria");
option("return"); option("return");
menuxoff = -60;
menuyoff = 10; menuyoff = 10;
break; break;
case Menu::playint2: case Menu::playint2:
@ -7438,7 +7415,6 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("Verdigris"); option("Verdigris");
option("Victoria"); option("Victoria");
option("return"); option("return");
menuxoff = -60;
menuyoff = 10; menuyoff = 10;
break; break;
case Menu::continuemenu: case Menu::continuemenu:
@ -7446,14 +7422,12 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("continue from teleporter"); option("continue from teleporter");
option("continue from quicksave"); option("continue from quicksave");
option("return to play menu"); option("return to play menu");
menuxoff = -60;
menuyoff = 20; menuyoff = 20;
break; break;
case Menu::startnodeathmode: case Menu::startnodeathmode:
option("disable cutscenes"); option("disable cutscenes");
option("enable cutscenes"); option("enable cutscenes");
option("return to play menu"); option("return to play menu");
menuxoff = -60;
menuyoff = 40; menuyoff = 40;
break; break;
case Menu::gameover: case Menu::gameover:
@ -7462,7 +7436,6 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
break; break;
case Menu::gameover2: case Menu::gameover2:
option("return to play menu"); option("return to play menu");
menuxoff = -25;
menuyoff = 80; menuyoff = 80;
break; break;
case Menu::unlockmenutrials: case Menu::unlockmenutrials:
@ -7474,7 +7447,6 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("the final level", !unlock[14]); option("the final level", !unlock[14]);
option("return to unlock menu"); option("return to unlock menu");
menuxoff = -80;
menuyoff = 0; menuyoff = 0;
break; break;
case Menu::timetrials: case Menu::timetrials:
@ -7486,8 +7458,8 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option(unlock[14] ? "the final level" : "???", unlock[14]); option(unlock[14] ? "the final level" : "???", unlock[14]);
option("return to play menu"); option("return to play menu");
menuxoff = -80;
menuyoff = 0; menuyoff = 0;
maxspacing = 15;
break; break;
case Menu::nodeathmodecomplete: case Menu::nodeathmodecomplete:
menucountdown = 90; menucountdown = 90;
@ -7495,7 +7467,6 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
break; break;
case Menu::nodeathmodecomplete2: case Menu::nodeathmodecomplete2:
option("return to play menu"); option("return to play menu");
menuxoff = -25;
menuyoff = 70; menuyoff = 70;
break; break;
case Menu::timetrialcomplete: case Menu::timetrialcomplete:
@ -7509,15 +7480,33 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
case Menu::timetrialcomplete3: case Menu::timetrialcomplete3:
option("return to play menu"); option("return to play menu");
option("try again"); option("try again");
menuxoff = -25;
menuyoff = 70; menuyoff = 70;
break; break;
case Menu::gamecompletecontinue: case Menu::gamecompletecontinue:
option("return to play menu"); option("return to play menu");
menuxoff = -25;
menuyoff = 70; menuyoff = 70;
break; break;
} }
// Automatically center the menu. We must check the width of the menu with the initial horizontal spacing.
// If it's too wide, reduce the horizontal spacing by 5 and retry.
// Try to limit the menu width to 272 pixels: 320 minus 16*2 for square brackets, minus 8*2 padding.
// The square brackets fall outside the menu width (i.e. selected menu options are printed 16 pixels to the left)
bool done_once = false;
int menuwidth = 0;
for (; !done_once || (menuwidth > 272 && menuspacing > 0); maxspacing -= 5)
{
done_once = true;
menuspacing = maxspacing;
menuwidth = 0;
for (size_t i = 0; i < menuoptions.size(); i++)
{
int width = i*menuspacing + graphics.len(menuoptions[i].text);
if (width > menuwidth)
menuwidth = width;
}
}
menuxoff = (320-menuwidth)/2;
} }
void Game::deletequick() void Game::deletequick()

View file

@ -218,6 +218,7 @@ public:
enum Menu::MenuName kludge_ingametemp; enum Menu::MenuName kludge_ingametemp;
int current_credits_list_index; int current_credits_list_index;
int menuxoff, menuyoff; int menuxoff, menuyoff;
int menuspacing;
std::vector<MenuStackFrame> menustack; std::vector<MenuStackFrame> menustack;
void inline option(std::string text, bool active = true) void inline option(std::string text, bool active = true)

View file

@ -1260,7 +1260,7 @@ void Graphics::processfade()
} }
} }
void Graphics::drawmenu( int cr, int cg, int cb, int division /*= 30*/ ) void Graphics::drawmenu( int cr, int cg, int cb )
{ {
for (size_t i = 0; i < game.menuoptions.size(); i++) for (size_t i = 0; i < game.menuoptions.size(); i++)
{ {
@ -1272,14 +1272,14 @@ void Graphics::drawmenu( int cr, int cg, int cb, int division /*= 30*/ )
std::string tempstring = game.menuoptions[i].text; std::string tempstring = game.menuoptions[i].text;
std::transform(tempstring.begin(), tempstring.end(),tempstring.begin(), ::toupper); std::transform(tempstring.begin(), tempstring.end(),tempstring.begin(), ::toupper);
tempstring = std::string("[ ") + tempstring + std::string(" ]"); tempstring = std::string("[ ") + tempstring + std::string(" ]");
Print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb); Print((i * game.menuspacing) - 16 +game.menuxoff, 140 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb);
} }
else else
{ {
std::string tempstring = game.menuoptions[i].text; std::string tempstring = game.menuoptions[i].text;
tempstring = "[ " + tempstring + " ]"; tempstring = "[ " + tempstring + " ]";
//Draw it in gray //Draw it in gray
Print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128); Print((i * game.menuspacing) - 16 +game.menuxoff, 140 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128);
} }
} }
else else
@ -1287,18 +1287,18 @@ void Graphics::drawmenu( int cr, int cg, int cb, int division /*= 30*/ )
//Draw it normally //Draw it normally
if (game.menuoptions[i].active) if (game.menuoptions[i].active)
{ {
Print(110 + (i * division) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i].text, cr, cg, cb); Print((i * game.menuspacing) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i].text, cr, cg, cb);
} }
else else
{ {
//Draw it in gray //Draw it in gray
Print(110 + (i * division) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i].text, 128, 128, 128); Print((i * game.menuspacing) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i].text, 128, 128, 128);
} }
} }
} }
} }
void Graphics::drawlevelmenu( int cr, int cg, int cb, int division /*= 30*/ ) void Graphics::drawlevelmenu( int cr, int cg, int cb )
{ {
for (size_t i = 0; i < game.menuoptions.size(); i++) for (size_t i = 0; i < game.menuoptions.size(); i++)
{ {
@ -1311,14 +1311,14 @@ void Graphics::drawlevelmenu( int cr, int cg, int cb, int division /*= 30*/ )
std::string tempstring = game.menuoptions[i].text; std::string tempstring = game.menuoptions[i].text;
std::transform(tempstring.begin(), tempstring.end(),tempstring.begin(), ::toupper); std::transform(tempstring.begin(), tempstring.end(),tempstring.begin(), ::toupper);
tempstring = std::string("[ ") + tempstring + std::string(" ]"); tempstring = std::string("[ ") + tempstring + std::string(" ]");
Print(110 + (i * division) - 16 +game.menuxoff, 140+8 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb); Print((i * game.menuspacing) - 16 +game.menuxoff, 140+8 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb);
} }
else else
{ {
std::string tempstring = game.menuoptions[i].text; std::string tempstring = game.menuoptions[i].text;
tempstring = "[ " + tempstring + " ]"; tempstring = "[ " + tempstring + " ]";
//Draw it in gray //Draw it in gray
Print(110 + (i * division) - 16 +game.menuxoff, 140+8 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128); Print((i * game.menuspacing) - 16 +game.menuxoff, 140+8 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128);
} }
}else{ }else{
//Draw it highlighted //Draw it highlighted
@ -1327,14 +1327,14 @@ void Graphics::drawlevelmenu( int cr, int cg, int cb, int division /*= 30*/ )
std::string tempstring = game.menuoptions[i].text; std::string tempstring = game.menuoptions[i].text;
std::transform(tempstring.begin(), tempstring.end(),tempstring.begin(), ::toupper); std::transform(tempstring.begin(), tempstring.end(),tempstring.begin(), ::toupper);
tempstring = std::string("[ ") + tempstring + std::string(" ]"); tempstring = std::string("[ ") + tempstring + std::string(" ]");
Print(110 + (i * division) - 16 +game.menuxoff, 144 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb); Print((i * game.menuspacing) - 16 +game.menuxoff, 144 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb);
} }
else else
{ {
std::string tempstring = game.menuoptions[i].text; std::string tempstring = game.menuoptions[i].text;
tempstring = "[ " + tempstring + " ]"; tempstring = "[ " + tempstring + " ]";
//Draw it in gray //Draw it in gray
Print(110 + (i * division) - 16 +game.menuxoff, 144 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128); Print((i * game.menuspacing) - 16 +game.menuxoff, 144 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128);
} }
} }
} }
@ -1344,23 +1344,23 @@ void Graphics::drawlevelmenu( int cr, int cg, int cb, int division /*= 30*/ )
//Draw it normally //Draw it normally
if (game.menuoptions[i].active) if (game.menuoptions[i].active)
{ {
Print(110 + (i * division) +game.menuxoff, 140+8 + (i * 12)+game.menuyoff, game.menuoptions[i].text, cr, cg, cb); Print((i * game.menuspacing) +game.menuxoff, 140+8 + (i * 12)+game.menuyoff, game.menuoptions[i].text, cr, cg, cb);
} }
else else
{ {
//Draw it in gray //Draw it in gray
Print(110 + (i * division) +game.menuxoff, 140+8 + (i * 12)+game.menuyoff, game.menuoptions[i].text, 128, 128, 128); Print((i * game.menuspacing) +game.menuxoff, 140+8 + (i * 12)+game.menuyoff, game.menuoptions[i].text, 128, 128, 128);
} }
}else{ }else{
//Draw it normally //Draw it normally
if (game.menuoptions[i].active) if (game.menuoptions[i].active)
{ {
Print(110 + (i * division) +game.menuxoff, 144 + (i * 12)+game.menuyoff, game.menuoptions[i].text, cr, cg, cb); Print((i * game.menuspacing) +game.menuxoff, 144 + (i * 12)+game.menuyoff, game.menuoptions[i].text, cr, cg, cb);
} }
else else
{ {
//Draw it in gray //Draw it in gray
Print(110 + (i * division) +game.menuxoff, 144 + (i * 12)+game.menuyoff, game.menuoptions[i].text, 128, 128, 128); Print((i * game.menuspacing) +game.menuxoff, 144 + (i * 12)+game.menuyoff, game.menuoptions[i].text, 128, 128, 128);
} }
} }
} }

View file

@ -46,8 +46,8 @@ public:
void drawcoloredtile(int x, int y, int t, int r, int g, int b); void drawcoloredtile(int x, int y, int t, int r, int g, int b);
void drawmenu(int cr, int cg, int cb, int division = 30); void drawmenu(int cr, int cg, int cb);
void drawlevelmenu(int cr, int cg, int cb, int division = 30); void drawlevelmenu(int cr, int cg, int cb);
void processfade(); void processfade();

View file

@ -1116,29 +1116,9 @@ void titlerender()
if(tg>255) tg=255; if(tg>255) tg=255;
if (tb < 0) tb = 0; if (tb < 0) tb = 0;
if(tb>255) tb=255; if(tb>255) tb=255;
if (game.currentmenuname == Menu::timetrials || game.currentmenuname == Menu::unlockmenutrials) if (game.currentmenuname == Menu::levellist)
{ {
graphics.drawmenu(tr, tg, tb, 15); graphics.drawlevelmenu(tr, tg, tb);
}
else if (game.currentmenuname == Menu::unlockmenu)
{
graphics.drawmenu(tr, tg, tb, 15);
}
else if (game.currentmenuname == Menu::playmodes)
{
graphics.drawmenu(tr, tg, tb, 20);
}
else if (game.currentmenuname == Menu::mainmenu)
{
graphics.drawmenu(tr, tg, tb, 15);
}
else if (game.currentmenuname == Menu::playerworlds)
{
graphics.drawmenu(tr, tg, tb, 15);
}
else if (game.currentmenuname == Menu::levellist)
{
graphics.drawlevelmenu(tr, tg, tb, 5);
} }
else else
{ {

View file

@ -3143,7 +3143,7 @@ void editorrender()
if(tb>255) tb=255; if(tb>255) tb=255;
editormenurender(tr, tg, tb); editormenurender(tr, tg, tb);
graphics.drawmenu(tr, tg, tb, 15); graphics.drawmenu(tr, tg, tb);
} }
else if(ed.scripttextmod) else if(ed.scripttextmod)
{ {