mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-07 08:21:59 +00:00
The download bar is now seperate from Con_DrawConsole. This is currently
not really for the best, but it will be soon.
This commit is contained in:
parent
9564680d58
commit
b2a53d4b46
5 changed files with 22 additions and 5 deletions
|
@ -62,6 +62,7 @@ void Con_CheckResize (void);
|
||||||
void Con_Init (void);
|
void Con_Init (void);
|
||||||
void Con_Init_Cvars (void);
|
void Con_Init_Cvars (void);
|
||||||
void Con_DrawConsole (int lines);
|
void Con_DrawConsole (int lines);
|
||||||
|
void Con_DrawDownload (int lines);
|
||||||
void Con_Print (char *txt);
|
void Con_Print (char *txt);
|
||||||
void Con_Printf (char *fmt, ...) __attribute__((format(printf,1,2)));
|
void Con_Printf (char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||||
void Con_DPrintf (char *fmt, ...) __attribute__((format(printf,1,2)));
|
void Con_DPrintf (char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||||
|
|
|
@ -579,3 +579,8 @@ Con_DrawConsole (int lines)
|
||||||
Con_DrawInput ();
|
Con_DrawInput ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Con_DrawDownload (int lines)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -533,11 +533,10 @@ Con_DrawNotify (void)
|
||||||
void
|
void
|
||||||
Con_DrawConsole (int lines)
|
Con_DrawConsole (int lines)
|
||||||
{
|
{
|
||||||
int i, j, x, y, n;
|
int i, x, y;
|
||||||
int rows;
|
int rows;
|
||||||
char *text;
|
char *text;
|
||||||
int row;
|
int row;
|
||||||
char dlbar[1024];
|
|
||||||
|
|
||||||
if (lines <= 0)
|
if (lines <= 0)
|
||||||
return;
|
return;
|
||||||
|
@ -576,6 +575,17 @@ Con_DrawConsole (int lines)
|
||||||
Draw_Character8 ((x + 1) << 3, y, text[x]);
|
Draw_Character8 ((x + 1) << 3, y, text[x]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// draw the input prompt, user text, and cursor if desired
|
||||||
|
Con_DrawInput ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Con_DrawDownload (int lines)
|
||||||
|
{
|
||||||
|
int i, j, x, y, n;
|
||||||
|
char *text;
|
||||||
|
char dlbar[1024];
|
||||||
|
|
||||||
// draw the download bar
|
// draw the download bar
|
||||||
// figure out width
|
// figure out width
|
||||||
if (cls.download) {
|
if (cls.download) {
|
||||||
|
@ -615,10 +625,9 @@ Con_DrawConsole (int lines)
|
||||||
" %02d%%", cls.downloadpercent);
|
" %02d%%", cls.downloadpercent);
|
||||||
|
|
||||||
// draw it
|
// draw it
|
||||||
y = con_vislines - 22 + 8;
|
y = lines - 22 + 8;
|
||||||
for (i = 0; i < strlen (dlbar); i++)
|
for (i = 0; i < strlen (dlbar); i++)
|
||||||
Draw_Character8 ((i + 1) << 3, y, dlbar[i]);
|
Draw_Character8 ((i + 1) << 3, y, dlbar[i]);
|
||||||
}
|
}
|
||||||
// draw the input prompt, user text, and cursor if desired
|
|
||||||
Con_DrawInput ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -616,6 +616,7 @@ SCR_DrawConsole (void)
|
||||||
if (scr_con_current) {
|
if (scr_con_current) {
|
||||||
scr_copyeverything = 1;
|
scr_copyeverything = 1;
|
||||||
Con_DrawConsole (scr_con_current);
|
Con_DrawConsole (scr_con_current);
|
||||||
|
Con_DrawDownload (scr_con_current);
|
||||||
clearconsole = 0;
|
clearconsole = 0;
|
||||||
} else {
|
} else {
|
||||||
if (key_dest == key_game || key_dest == key_message)
|
if (key_dest == key_game || key_dest == key_message)
|
||||||
|
|
|
@ -631,6 +631,7 @@ SCR_DrawConsole (void)
|
||||||
if (scr_con_current) {
|
if (scr_con_current) {
|
||||||
scr_copyeverything = 1;
|
scr_copyeverything = 1;
|
||||||
Con_DrawConsole (scr_con_current);
|
Con_DrawConsole (scr_con_current);
|
||||||
|
Con_DrawDownload (scr_con_current);
|
||||||
clearconsole = 0;
|
clearconsole = 0;
|
||||||
} else {
|
} else {
|
||||||
if (key_dest == key_game || key_dest == key_message)
|
if (key_dest == key_game || key_dest == key_message)
|
||||||
|
|
Loading…
Reference in a new issue