mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- added background dimming for the menu when in overlay mode.
This commit is contained in:
parent
b142f33edd
commit
16a4d49268
2 changed files with 5 additions and 20 deletions
|
@ -491,6 +491,7 @@ void I_StartupJoysticks();
|
|||
void I_ShutdownInput();
|
||||
int RunGame();
|
||||
void System_MenuClosed();
|
||||
void System_MenuDim();
|
||||
|
||||
int GameMain()
|
||||
{
|
||||
|
@ -510,7 +511,7 @@ int GameMain()
|
|||
nullptr,
|
||||
System_GetSceneRect,
|
||||
nullptr,
|
||||
nullptr,
|
||||
System_MenuDim,
|
||||
nullptr,
|
||||
System_DispatchEvent,
|
||||
validFilter,
|
||||
|
|
|
@ -186,35 +186,19 @@ void System_MenuClosed()
|
|||
gi->MenuClosed();
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// M_Dim
|
||||
//
|
||||
// Applies a colored overlay to the entire screen, with the opacity
|
||||
// determined by the dimamount cvar.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
CUSTOM_CVAR(Float, dimamount, -1.f, CVAR_ARCHIVE)
|
||||
void System_MenuDim()
|
||||
{
|
||||
if (self < 0.f && self != -1.f)
|
||||
if (gamestate != GS_MENUSCREEN) // With GS_MENUSCREEN we can assume that the background has been tuned for proper menu display already.
|
||||
{
|
||||
self = -1.f;
|
||||
}
|
||||
else if (self > 1.f)
|
||||
{
|
||||
self = 1.f;
|
||||
Dim(twod, 0, 0.5f, 0, 0, screen->GetWidth(), screen->GetHeight());
|
||||
}
|
||||
}
|
||||
CVAR(Color, dimcolor, 0xffd700, CVAR_ARCHIVE)
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue