- fixed dimming checks for menu.

Now with proper game state management this can be done better.
This commit is contained in:
Christoph Oelckers 2020-08-10 20:43:51 +02:00
parent 28b9aafe69
commit b1c8046470

View file

@ -391,7 +391,6 @@ void M_StartControlPanel (bool makeSound)
BackbuttonTime = 0; BackbuttonTime = 0;
BackbuttonAlpha = 0; BackbuttonAlpha = 0;
DrawBackground = -1;
} }
void Menu_Open(int playerid) void Menu_Open(int playerid)
@ -433,11 +432,7 @@ bool M_SetMenu(FName menu, int param, FName caller)
NewGameStartupInfo.Episode = NewGameStartupInfo.Skill = 0; NewGameStartupInfo.Episode = NewGameStartupInfo.Skill = 0;
menu = NAME_Startgame; menu = NAME_Startgame;
#endif #endif
if (DrawBackground == -1) DrawBackground = gamestate == GS_DEMOSCREEN;
{
if (menu == NAME_Mainmenu) DrawBackground = 1;
else DrawBackground = 0;
}
// some menus need some special treatment (needs to be adjusted for the various frontends. // some menus need some special treatment (needs to be adjusted for the various frontends.
switch (caller.GetIndex()) switch (caller.GetIndex())
{ {
@ -934,7 +929,6 @@ void M_Drawer (void)
{ {
assert(CurrentMenu); assert(CurrentMenu);
CurrentMenu->origin = { 0,0 }; CurrentMenu->origin = { 0,0 };
// else if (DrawBackground) Menu_DrawBackground(origin);
CurrentMenu->Drawer(); CurrentMenu->Drawer();
} }
} }