mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
De-duplicate Graphics::drawmenu() and Graphics::drawlevelmenu()
Graphics::drawmenu() no longer has copy-pasted code for each individual case. Instead, the individual cases have their own adding on to common code, which is far easier to maintain. Also, the only difference Graphics::drawlevelmenu() does is in some y-positioning stuff. There's no reason to make it a whole separate function and duplicate everything AGAIN. So it's been consolidated into Graphics::drawmenu() as well, and I've added a boolean to draw a menu this way if it's the level menu.
This commit is contained in:
@@ -1188,14 +1188,7 @@ void titlerender()
|
||||
if(tg>255) tg=255;
|
||||
if (tb < 0) tb = 0;
|
||||
if(tb>255) tb=255;
|
||||
if (game.currentmenuname == Menu::levellist)
|
||||
{
|
||||
graphics.drawlevelmenu(tr, tg, tb);
|
||||
}
|
||||
else
|
||||
{
|
||||
graphics.drawmenu(tr, tg, tb);
|
||||
}
|
||||
graphics.drawmenu(tr, tg, tb, game.currentmenuname == Menu::levellist);
|
||||
}
|
||||
|
||||
graphics.drawfade();
|
||||
|
||||
Reference in New Issue
Block a user