Merge branch 'you-cant-escape-console' into 'master'

Open the console in menus and draw backpic correctly

See merge request STJr/SRB2!665
This commit is contained in:
James R 2020-01-12 15:38:51 -05:00
commit 50d1226224
2 changed files with 10 additions and 15 deletions

View File

@ -612,15 +612,6 @@ void CON_Ticker(void)
con_tick++;
con_tick &= 7;
// if the menu is open then close the console.
if (menuactive && con_destlines)
{
consoletoggle = false;
con_destlines = 0;
CON_ClearHUD();
I_UpdateMouseGrab();
}
// console key was pushed
if (consoletoggle)
{
@ -792,7 +783,7 @@ boolean CON_Responder(event_t *ev)
// check other keys only if console prompt is active
if (!consoleready && key < NUMINPUTS) // metzgermeister: boundary check!!
{
if (bindtable[key])
if (! menuactive && bindtable[key])
{
COM_BufAddText(bindtable[key]);
COM_BufAddText("\n");
@ -1551,9 +1542,14 @@ static void CON_DrawConsole(void)
if (cons_backpic.value || con_forcepic)
{
patch_t *con_backpic = W_CachePatchName("CONSBACK", PU_PATCH);
int h;
h = con_curlines/vid.dupy;
// Jimita: CON_DrawBackpic just called V_DrawScaledPatch
V_DrawScaledPatch(0, 0, 0, con_backpic);
//V_DrawScaledPatch(0, 0, 0, con_backpic);
V_DrawCroppedPatch(0, 0, FRACUNIT, 0, con_backpic,
0, ( BASEVIDHEIGHT - h ), BASEVIDWIDTH, h);
W_UnlockCachedPatch(con_backpic);
}

View File

@ -502,13 +502,12 @@ static void D_Display(void)
// vid size change is now finished if it was on...
vid.recalc = 0;
// FIXME: draw either console or menu, not the two
if (gamestate != GS_TIMEATTACK)
CON_Drawer();
M_Drawer(); // menu is drawn even on top of everything
// focus lost moved to M_Drawer
if (gamestate != GS_TIMEATTACK)
CON_Drawer();
//
// wipe update
//