mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Draw the input prompt while the console is moving
This commit is contained in:
parent
4c08b7010d
commit
c36d987be7
1 changed files with 26 additions and 26 deletions
|
|
@ -59,7 +59,7 @@ static boolean con_started = false; // console has been initialised
|
|||
static boolean con_forcepic = true; // at startup toggle console translucency when first off
|
||||
boolean con_recalc; // set true when screen size has changed
|
||||
|
||||
static tic_t con_tick; // console ticker for anim or blinking prompt cursor
|
||||
static tic_t con_tick; // console ticker for blinking prompt cursor
|
||||
// con_scrollup should use time (currenttime - lasttime)..
|
||||
|
||||
static boolean consoletoggle; // true when console key pushed, ticker will handle
|
||||
|
|
@ -1814,41 +1814,41 @@ static void CON_DrawConsole(void)
|
|||
}
|
||||
|
||||
// draw console text lines from top to bottom
|
||||
if (con_curlines < minheight)
|
||||
return;
|
||||
|
||||
i = con_cy - con_scrollup;
|
||||
|
||||
// skip the last empty line due to the cursor being at the start of a new line
|
||||
i--;
|
||||
|
||||
i -= (con_curlines - minheight) / charheight;
|
||||
|
||||
if (rendermode == render_none) return;
|
||||
|
||||
for (y = (con_curlines-minheight) % charheight; y <= con_curlines-minheight; y += charheight, i++)
|
||||
if (con_curlines >= minheight)
|
||||
{
|
||||
INT32 x;
|
||||
size_t c;
|
||||
i = con_cy - con_scrollup;
|
||||
|
||||
p = (UINT8 *)&con_buffer[((i > 0 ? i : 0)%con_totallines)*con_width];
|
||||
// skip the last empty line due to the cursor being at the start of a new line
|
||||
i--;
|
||||
|
||||
for (c = 0, x = charwidth; c < con_width; c++, x += charwidth, p++)
|
||||
i -= (con_curlines - minheight) / charheight;
|
||||
|
||||
if (rendermode == render_none) return;
|
||||
|
||||
for (y = (con_curlines-minheight) % charheight; y <= con_curlines-minheight; y += charheight, i++)
|
||||
{
|
||||
while (*p & 0x80)
|
||||
INT32 x;
|
||||
size_t c;
|
||||
|
||||
p = (UINT8 *)&con_buffer[((i > 0 ? i : 0)%con_totallines)*con_width];
|
||||
|
||||
for (c = 0, x = charwidth; c < con_width; c++, x += charwidth, p++)
|
||||
{
|
||||
charflags = (*p & 0x7f) << V_CHARCOLORSHIFT;
|
||||
p++;
|
||||
c++;
|
||||
while (*p & 0x80)
|
||||
{
|
||||
charflags = (*p & 0x7f) << V_CHARCOLORSHIFT;
|
||||
p++;
|
||||
c++;
|
||||
}
|
||||
if (c >= con_width)
|
||||
break;
|
||||
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, true);
|
||||
}
|
||||
if (c >= con_width)
|
||||
break;
|
||||
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, true);
|
||||
}
|
||||
}
|
||||
|
||||
// draw prompt if enough place (not while game startup)
|
||||
if ((con_curlines == con_destlines) && (con_curlines >= minheight) && !con_startup)
|
||||
if ((con_curlines >= (minheight-charheight)) && !con_startup)
|
||||
CON_DrawInput();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue