- implement ccmd 'togglehud' for taking screenshots

- it disables most 2D drawing in order to favor a fullscreen output view for screenshot taking
  - enabling the console or any menu should cancel it
  - it does use several CVARs but their state should be restored when this mode is canceled
This commit is contained in:
Rachael Alexanderson 2019-11-03 03:51:22 -05:00
commit e55a935220
3 changed files with 128 additions and 70 deletions

View file

@ -73,6 +73,9 @@
#define RIGHTMARGIN 8
#define BOTTOMARGIN 12
extern bool hud_toggled;
void D_ToggleHud();
CUSTOM_CVAR(Int, con_buffersize, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{
@ -1256,6 +1259,8 @@ void C_DrawConsole ()
void C_FullConsole ()
{
if (hud_toggled)
D_ToggleHud();
if (demoplayback)
G_CheckDemoStatus ();
D_QuitNetGame ();
@ -1290,6 +1295,8 @@ void C_ToggleConsole ()
HistPos = NULL;
TabbedLast = false;
TabbedList = false;
if (hud_toggled)
D_ToggleHud();
}
else if (gamestate != GS_FULLCONSOLE && gamestate != GS_STARTUP)
{