mirror of
https://github.com/blendogames/thirtyflightsofloving.git
synced 2025-01-18 06:22:30 +00:00
Added ui_font and scr_font cvars to separately change menu and HUD font.
Added R_DrawString() to allow drawing of text strings directly in the renderer. Refactored r_speeds drawing to use new R_DrawString() function.
This commit is contained in:
parent
4f3255e0fa
commit
a07cf5c962
17 changed files with 349 additions and 161 deletions
|
@ -44,9 +44,9 @@ extern int key_linepos;
|
||||||
Con_DrawString
|
Con_DrawString
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void Con_DrawString (int x, int y, char *string, int alpha)
|
void Con_DrawString (int x, int y, char *string, fontslot_t font, int alpha)
|
||||||
{
|
{
|
||||||
CL_DrawStringGeneric (x, y, string, alpha, FONT_SIZE, SCALETYPE_CONSOLE, false);
|
CL_DrawStringGeneric (x, y, string, font, alpha, FONT_SIZE, SCALETYPE_CONSOLE, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -665,7 +665,7 @@ void Con_DrawInput (void)
|
||||||
Q_strncatz (output, addch, sizeof(output));
|
Q_strncatz (output, addch, sizeof(output));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Con_DrawString ( (int)conLeft + FONT_SIZE/2, con.vislines - (int)(2.75*FONT_SIZE), output, 255);
|
Con_DrawString ( (int)conLeft + FONT_SIZE/2, con.vislines - (int)(2.75*FONT_SIZE), output, FONT_CONSOLE, 255);
|
||||||
|
|
||||||
// remove cursor
|
// remove cursor
|
||||||
key_lines[edit_line][key_linepos] = 0;
|
key_lines[edit_line][key_linepos] = 0;
|
||||||
|
@ -683,7 +683,7 @@ void Con_DrawNotify (void)
|
||||||
int x;
|
int x;
|
||||||
char *text, output[2048], addch[8];
|
char *text, output[2048], addch[8];
|
||||||
int i, j;
|
int i, j;
|
||||||
//int time;
|
// int time;
|
||||||
char *s;
|
char *s;
|
||||||
int alpha, lines;
|
int alpha, lines;
|
||||||
float v, time, conLeft, conWidth;
|
float v, time, conLeft, conWidth;
|
||||||
|
@ -735,7 +735,7 @@ void Con_DrawNotify (void)
|
||||||
Q_strncatz (output, addch, sizeof(output));
|
Q_strncatz (output, addch, sizeof(output));
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_DrawString ((int)conLeft, v, output, 255);
|
Con_DrawString ((int)conLeft, v, output, FONT_SCREEN, 255);
|
||||||
|
|
||||||
v += FONT_SIZE*2; // make extra space so we have room
|
v += FONT_SIZE*2; // make extra space so we have room
|
||||||
}
|
}
|
||||||
|
@ -783,7 +783,7 @@ void Con_DrawNotify (void)
|
||||||
Q_strncatz (output, addch, sizeof(output));
|
Q_strncatz (output, addch, sizeof(output));
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_DrawString ((int)conLeft + FONT_SIZE/2, v, output, alpha);
|
Con_DrawString ((int)conLeft + FONT_SIZE/2, v, output, FONT_SCREEN, alpha);
|
||||||
|
|
||||||
v += FONT_SIZE;
|
v += FONT_SIZE;
|
||||||
}
|
}
|
||||||
|
@ -853,7 +853,7 @@ void Con_DrawDownloadProgress (float conLeft, float conWidth, float conLineHeigh
|
||||||
len = (int)strlen(dlbar);
|
len = (int)strlen(dlbar);
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
if (dlbar[i] != ' ')
|
if (dlbar[i] != ' ')
|
||||||
R_DrawChar((int)conLeft + (i+1)*FONT_SIZE, graph_y, dlbar[i], CON_FONT_SCALE, 255, 255, 255, 255, false, (i==(len-1)) );
|
R_DrawChar((int)conLeft + (i+1)*FONT_SIZE, graph_y, dlbar[i], FONT_CONSOLE, CON_FONT_SCALE, 255, 255, 255, 255, false, (i==(len-1)) );
|
||||||
|
|
||||||
// new solid color download bar
|
// new solid color download bar
|
||||||
graph_x--; graph_y--; graph_w+=2; graph_h+=2;
|
graph_x--; graph_y--; graph_w+=2; graph_h+=2;
|
||||||
|
@ -940,7 +940,7 @@ void Con_DrawConsole (float frac, qboolean trans)
|
||||||
Com_sprintf (version, sizeof(version), S_COLOR_BOLD S_COLOR_SHADOW S_COLOR_ALT"KMQuake2 v%4.2f", VERSION);
|
Com_sprintf (version, sizeof(version), S_COLOR_BOLD S_COLOR_SHADOW S_COLOR_ALT"KMQuake2 v%4.2f", VERSION);
|
||||||
#endif // NEW_ENTITY_STATE_MEMBERS
|
#endif // NEW_ENTITY_STATE_MEMBERS
|
||||||
|
|
||||||
Con_DrawString ((int)(conLeft+conWidth)-FONT_SIZE*(stringLen((const char *)&version))-3, y-(int)(1.25*FONT_SIZE), version, 255);
|
Con_DrawString ((int)(conLeft+conWidth)-FONT_SIZE*(stringLen((const char *)&version))-3, y-(int)(1.25*FONT_SIZE), version, FONT_CONSOLE, 255);
|
||||||
|
|
||||||
// if ( (newconback_found && con_newconback->value) || con_oldconbar->value ) // Q3-style console bottom bar
|
// if ( (newconback_found && con_newconback->value) || con_oldconbar->value ) // Q3-style console bottom bar
|
||||||
if ( (newconback_found && con_newconback->integer) || con_oldconbar->integer ) // Q3-style console bottom bar
|
if ( (newconback_found && con_newconback->integer) || con_oldconbar->integer ) // Q3-style console bottom bar
|
||||||
|
@ -956,7 +956,7 @@ void Con_DrawConsole (float frac, qboolean trans)
|
||||||
{
|
{
|
||||||
// draw arrows to show the buffer is backscrolled
|
// draw arrows to show the buffer is backscrolled
|
||||||
for (x = 0; x < con.linewidth; x+=4)
|
for (x = 0; x < con.linewidth; x+=4)
|
||||||
R_DrawChar ((int)conLeft + (x+1)*FONT_SIZE, y, '^', CON_FONT_SCALE, 255, 0, 0, 255, false, ((x+4)>=con.linewidth) );
|
R_DrawChar ((int)conLeft + (x+1)*FONT_SIZE, y, '^', FONT_CONSOLE, CON_FONT_SCALE, 255, 0, 0, 255, false, ((x+4)>=con.linewidth) );
|
||||||
|
|
||||||
y -= FONT_SIZE;
|
y -= FONT_SIZE;
|
||||||
rows--;
|
rows--;
|
||||||
|
@ -979,7 +979,7 @@ void Con_DrawConsole (float frac, qboolean trans)
|
||||||
addch[1] = '\0';
|
addch[1] = '\0';
|
||||||
Q_strncatz (output, addch, sizeof(output));
|
Q_strncatz (output, addch, sizeof(output));
|
||||||
}
|
}
|
||||||
Con_DrawString ((int)conLeft + 4, y, output, 255);
|
Con_DrawString ((int)conLeft + 4, y, output, FONT_CONSOLE, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ZOID- draw the download bar
|
// ZOID- draw the download bar
|
||||||
|
|
|
@ -47,7 +47,7 @@ Hud_DrawString
|
||||||
*/
|
*/
|
||||||
void Hud_DrawString (int x, int y, const char *string, int alpha, qboolean isStatusBar)
|
void Hud_DrawString (int x, int y, const char *string, int alpha, qboolean isStatusBar)
|
||||||
{
|
{
|
||||||
CL_DrawStringGeneric (x, y, string, alpha, HUD_FONT_SIZE, (isStatusBar) ? SCALETYPE_HUD : SCALETYPE_MENU, false);
|
CL_DrawStringGeneric (x, y, string, FONT_SCREEN, alpha, HUD_FONT_SIZE, (isStatusBar) ? SCALETYPE_HUD : SCALETYPE_MENU, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ void Hud_DrawStringAlt (int x, int y, const char *string, int alpha, qboolean is
|
||||||
for (i=0; i<len; i++) {
|
for (i=0; i<len; i++) {
|
||||||
highString[i] ^= 128;
|
highString[i] ^= 128;
|
||||||
}
|
}
|
||||||
CL_DrawStringGeneric (x, y, highString, alpha, HUD_FONT_SIZE, (isStatusBar) ? SCALETYPE_HUD : SCALETYPE_MENU, false);
|
CL_DrawStringGeneric (x, y, highString, FONT_SCREEN, alpha, HUD_FONT_SIZE, (isStatusBar) ? SCALETYPE_HUD : SCALETYPE_MENU, false);
|
||||||
// CL_DrawStringGeneric (x, y, string, alpha, HUD_FONT_SIZE, (isStatusBar) ? SCALETYPE_HUD : SCALETYPE_MENU, true);
|
// CL_DrawStringGeneric (x, y, string, alpha, HUD_FONT_SIZE, (isStatusBar) ? SCALETYPE_HUD : SCALETYPE_MENU, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -888,9 +888,9 @@ void CL_DrawInventory (void)
|
||||||
SCR_DrawPic (x, y, 256, 192, ALIGN_CENTER, "inventory", scr_hudalpha->value);
|
SCR_DrawPic (x, y, 256, 192, ALIGN_CENTER, "inventory", scr_hudalpha->value);
|
||||||
x += 24;
|
x += 24;
|
||||||
y += 20;
|
y += 20;
|
||||||
SCR_DrawString (x, y, 8, ALIGN_CENTER, S_COLOR_WHITE"hotkey ### item", 255);
|
SCR_DrawString (x, y, 8, ALIGN_CENTER, S_COLOR_WHITE"hotkey ### item", FONT_SCREEN, 255);
|
||||||
y += 8;
|
y += 8;
|
||||||
SCR_DrawString (x, y, 8, ALIGN_CENTER, S_COLOR_WHITE"------ --- ----", 255);
|
SCR_DrawString (x, y, 8, ALIGN_CENTER, S_COLOR_WHITE"------ --- ----", FONT_SCREEN, 255);
|
||||||
x += 16;
|
x += 16;
|
||||||
y += 8;
|
y += 8;
|
||||||
|
|
||||||
|
@ -945,8 +945,7 @@ void CL_DrawInventory (void)
|
||||||
|
|
||||||
// Hud_DrawString (x, y, string);
|
// Hud_DrawString (x, y, string);
|
||||||
// y += SCR_ScaledHud(8);
|
// y += SCR_ScaledHud(8);
|
||||||
SCR_DrawString (x, y, 8, ALIGN_CENTER, string, 255);
|
SCR_DrawString (x, y, 8, ALIGN_CENTER, string, FONT_SCREEN, 255);
|
||||||
y += 8;
|
y += 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -642,12 +642,12 @@ SCR_DrawChar
|
||||||
Coordinates are 640*480 virtual values
|
Coordinates are 640*480 virtual values
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void SCR_DrawChar (float x, float y, int size, scralign_t align, int num, int red, int green, int blue, int alpha, qboolean italic, qboolean last)
|
void SCR_DrawChar (float x, float y, int size, scralign_t align, int num, fontslot_t font, int red, int green, int blue, int alpha, qboolean italic, qboolean last)
|
||||||
{
|
{
|
||||||
float scale = SCR_ScaledScreen((float)size / (float)MENU_FONT_SIZE); // SCR_GetScreenScale()
|
float scale = SCR_ScaledScreen((float)size / (float)MENU_FONT_SIZE); // SCR_GetScreenScale()
|
||||||
|
|
||||||
SCR_AdjustFrom640 (&x, &y, NULL, NULL, align);
|
SCR_AdjustFrom640 (&x, &y, NULL, NULL, align);
|
||||||
R_DrawChar(x, y, num, scale, red, green, blue, alpha, italic, last);
|
R_DrawChar(x, y, num, font, scale, red, green, blue, alpha, italic, last);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -656,10 +656,10 @@ SCR_DrawString
|
||||||
Coordinates are 640*480 virtual values
|
Coordinates are 640*480 virtual values
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void SCR_DrawString (float x, float y, int size, scralign_t align, const char *string, int alpha)
|
void SCR_DrawString (float x, float y, int size, scralign_t align, const char *string, fontslot_t font, int alpha)
|
||||||
{
|
{
|
||||||
SCR_AdjustFrom640 (&x, &y, NULL, NULL, align);
|
SCR_AdjustFrom640 (&x, &y, NULL, NULL, align);
|
||||||
CL_DrawStringGeneric (x, y, string, alpha, size, SCALETYPE_MENU, false);
|
CL_DrawStringGeneric (x, y, string, font, alpha, size, SCALETYPE_MENU, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//===============================================================================
|
//===============================================================================
|
||||||
|
@ -717,8 +717,8 @@ static void SCR_ShowFPS (void)
|
||||||
// x = ( viddef.width - strlen(fpsText)*HUD_FONT_SIZE*SCR_GetScreenScale() - max(fragsSize, SCR_ScaledScreen(68)) );
|
// x = ( viddef.width - strlen(fpsText)*HUD_FONT_SIZE*SCR_GetScreenScale() - max(fragsSize, SCR_ScaledScreen(68)) );
|
||||||
x = (scrLeft - stringLen(fpsText)*HUD_FONT_SIZE*SCR_GetScreenScale() - max(fragsSize, SCR_ScaledScreen(68)));
|
x = (scrLeft - stringLen(fpsText)*HUD_FONT_SIZE*SCR_GetScreenScale() - max(fragsSize, SCR_ScaledScreen(68)));
|
||||||
y = 0;
|
y = 0;
|
||||||
// CL_DrawStringGeneric (x, y, fpsText, 255, MENU_FONT_SIZE, SCALETYPE_HUD, false); // SCALETYPE_CONSOLE
|
// CL_DrawStringGeneric (x, y, fpsText, FONT_SCREEN, 255, MENU_FONT_SIZE, SCALETYPE_HUD, false); // SCALETYPE_CONSOLE
|
||||||
CL_DrawStringGeneric (x, y, fpsText, 255, MENU_FONT_SIZE, SCALETYPE_MENU, false); // SCALETYPE_HUD
|
CL_DrawStringGeneric (x, y, fpsText, FONT_SCREEN, 255, MENU_FONT_SIZE, SCALETYPE_MENU, false); // SCALETYPE_HUD
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -858,8 +858,8 @@ void SCR_DrawDebugGraph (void)
|
||||||
ping = currentping;
|
ping = currentping;
|
||||||
}
|
}
|
||||||
|
|
||||||
CL_DrawStringGeneric (x, y + 5, va(S_COLOR_SHADOW"fps: %3i", fps), 255, FONT_SIZE, SCALETYPE_CONSOLE, false);
|
CL_DrawStringGeneric (x, y + 5, va(S_COLOR_SHADOW"fps: %3i", fps), FONT_SCREEN, 255, FONT_SIZE, SCALETYPE_CONSOLE, false);
|
||||||
CL_DrawStringGeneric (x, y + 5 + FONT_SIZE , va(S_COLOR_SHADOW"ping:%3i", ping), 255, FONT_SIZE, SCALETYPE_CONSOLE, false);
|
CL_DrawStringGeneric (x, y + 5 + FONT_SIZE , va(S_COLOR_SHADOW"ping:%3i", ping), FONT_SCREEN, 255, FONT_SIZE, SCALETYPE_CONSOLE, false);
|
||||||
|
|
||||||
// draw border
|
// draw border
|
||||||
R_DrawFill (x, y, (w+2), 1, 0, 0, 0, 255);
|
R_DrawFill (x, y, (w+2), 1, 0, 0, 0, 255);
|
||||||
|
@ -988,7 +988,7 @@ void SCR_DrawCenterString (void)
|
||||||
if (!remaining--)
|
if (!remaining--)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CL_DrawStringGeneric ( (int)((viddef.width-stringLen(line)*FONT_SIZE)*0.5), y, line, alpha, FONT_SIZE, SCALETYPE_CONSOLE, false);
|
CL_DrawStringGeneric ( (int)((viddef.width-stringLen(line)*FONT_SIZE)*0.5), y, line, FONT_SCREEN, alpha, FONT_SIZE, SCALETYPE_CONSOLE, false);
|
||||||
y += FONT_SIZE;
|
y += FONT_SIZE;
|
||||||
|
|
||||||
while (*start && *start != '\n')
|
while (*start && *start != '\n')
|
||||||
|
@ -1698,7 +1698,7 @@ void SCR_DrawLoading (void)
|
||||||
loadMsg = va("Downloading ["S_COLOR_ALT"%s"S_COLOR_WHITE"]: %3d%%", cls.downloadname, cls.downloadpercent);
|
loadMsg = va("Downloading ["S_COLOR_ALT"%s"S_COLOR_WHITE"]: %3d%%", cls.downloadname, cls.downloadpercent);
|
||||||
|
|
||||||
SCR_DrawString (SCREEN_WIDTH*0.5 - MENU_FONT_SIZE*stringLen(loadMsg)*0.5,
|
SCR_DrawString (SCREEN_WIDTH*0.5 - MENU_FONT_SIZE*stringLen(loadMsg)*0.5,
|
||||||
SCREEN_HEIGHT*0.5 + (plaqueOffset + 48), MENU_FONT_SIZE, ALIGN_CENTER, loadMsg, 255);
|
SCREEN_HEIGHT*0.5 + (plaqueOffset + 48), MENU_FONT_SIZE, ALIGN_CENTER, loadMsg, FONT_SCREEN, 255);
|
||||||
|
|
||||||
SCR_DrawLoadingTagProgress ("downloading_bar", plaqueOffset, cls.downloadpercent);
|
SCR_DrawLoadingTagProgress ("downloading_bar", plaqueOffset, cls.downloadpercent);
|
||||||
}
|
}
|
||||||
|
@ -1708,7 +1708,7 @@ void SCR_DrawLoading (void)
|
||||||
loadMsg = va("Downloading ["S_COLOR_ALT"%s"S_COLOR_WHITE"]", cls.downloadname);
|
loadMsg = va("Downloading ["S_COLOR_ALT"%s"S_COLOR_WHITE"]", cls.downloadname);
|
||||||
|
|
||||||
SCR_DrawString (SCREEN_WIDTH*0.5 - MENU_FONT_SIZE*stringLen(loadMsg)*0.5,
|
SCR_DrawString (SCREEN_WIDTH*0.5 - MENU_FONT_SIZE*stringLen(loadMsg)*0.5,
|
||||||
SCREEN_HEIGHT*0.5 + MENU_FONT_SIZE*4.5, MENU_FONT_SIZE, ALIGN_CENTER, loadMsg, 255);
|
SCREEN_HEIGHT*0.5 + MENU_FONT_SIZE*4.5, MENU_FONT_SIZE, ALIGN_CENTER, loadMsg, FONT_SCREEN, 255);
|
||||||
|
|
||||||
if (cls.downloadrate > 0.0f)
|
if (cls.downloadrate > 0.0f)
|
||||||
loadMsg = va("%3d%% (%4.2fKB/s)", cls.downloadpercent, cls.downloadrate);
|
loadMsg = va("%3d%% (%4.2fKB/s)", cls.downloadpercent, cls.downloadrate);
|
||||||
|
@ -1716,7 +1716,7 @@ void SCR_DrawLoading (void)
|
||||||
loadMsg = va("%3d%%", cls.downloadpercent);
|
loadMsg = va("%3d%%", cls.downloadpercent);
|
||||||
|
|
||||||
SCR_DrawString (SCREEN_WIDTH*0.5 - MENU_FONT_SIZE*stringLen(loadMsg)*0.5,
|
SCR_DrawString (SCREEN_WIDTH*0.5 - MENU_FONT_SIZE*stringLen(loadMsg)*0.5,
|
||||||
SCREEN_HEIGHT*0.5 + MENU_FONT_SIZE*6, MENU_FONT_SIZE, ALIGN_CENTER, loadMsg, 255);
|
SCREEN_HEIGHT*0.5 + MENU_FONT_SIZE*6, MENU_FONT_SIZE, ALIGN_CENTER, loadMsg, FONT_SCREEN, 255);
|
||||||
|
|
||||||
SCR_DrawLoadingBar (SCREEN_WIDTH*0.5 - 180, SCREEN_HEIGHT*0.5 + 60, 360, 24, cls.downloadpercent, 0.75);
|
SCR_DrawLoadingBar (SCREEN_WIDTH*0.5 - 180, SCREEN_HEIGHT*0.5 + 60, 360, 24, cls.downloadpercent, 0.75);
|
||||||
SCR_DrawAlertMessagePicture("downloading", false, -plaqueOffset);
|
SCR_DrawAlertMessagePicture("downloading", false, -plaqueOffset);
|
||||||
|
@ -1741,12 +1741,12 @@ void SCR_DrawLoading (void)
|
||||||
if (drawMapName) {
|
if (drawMapName) {
|
||||||
loadMsg = va(S_COLOR_SHADOW S_COLOR_WHITE"Loading Map ["S_COLOR_ALT"%s"S_COLOR_WHITE"]", cl.configstrings[CS_NAME]);
|
loadMsg = va(S_COLOR_SHADOW S_COLOR_WHITE"Loading Map ["S_COLOR_ALT"%s"S_COLOR_WHITE"]", cl.configstrings[CS_NAME]);
|
||||||
SCR_DrawString (SCREEN_WIDTH*0.5 - MENU_FONT_SIZE*stringLen(loadMsg)*0.5,
|
SCR_DrawString (SCREEN_WIDTH*0.5 - MENU_FONT_SIZE*stringLen(loadMsg)*0.5,
|
||||||
SCREEN_HEIGHT*0.5 + (plaqueOffset + 48), MENU_FONT_SIZE, ALIGN_CENTER, loadMsg, 255); // was - MENU_FONT_SIZE*7.5
|
SCREEN_HEIGHT*0.5 + (plaqueOffset + 48), MENU_FONT_SIZE, ALIGN_CENTER, loadMsg, FONT_SCREEN, 255); // was - MENU_FONT_SIZE*7.5
|
||||||
}
|
}
|
||||||
if (drawLoadingMsg) {
|
if (drawLoadingMsg) {
|
||||||
loadMsg = va(S_COLOR_SHADOW"%s", loadingMessages);
|
loadMsg = va(S_COLOR_SHADOW"%s", loadingMessages);
|
||||||
SCR_DrawString (SCREEN_WIDTH*0.5 - MENU_FONT_SIZE*stringLen(loadMsg)*0.5,
|
SCR_DrawString (SCREEN_WIDTH*0.5 - MENU_FONT_SIZE*stringLen(loadMsg)*0.5,
|
||||||
SCREEN_HEIGHT*0.5 + (plaqueOffset + 72), MENU_FONT_SIZE, ALIGN_CENTER, loadMsg, 255); // was - MENU_FONT_SIZE*4.5
|
SCREEN_HEIGHT*0.5 + (plaqueOffset + 72), MENU_FONT_SIZE, ALIGN_CENTER, loadMsg, FONT_SCREEN, 255); // was - MENU_FONT_SIZE*4.5
|
||||||
}
|
}
|
||||||
|
|
||||||
if (simplePlaque)
|
if (simplePlaque)
|
||||||
|
@ -2132,9 +2132,9 @@ void DrawDemoMessage (void)
|
||||||
char *message = "Running Demo";
|
char *message = "Running Demo";
|
||||||
len = (int)strlen(message);
|
len = (int)strlen(message);
|
||||||
|
|
||||||
SCR_DrawFill (0, SCREEN_HEIGHT-(MENU_FONT_SIZE+3), SCREEN_WIDTH, MENU_FONT_SIZE+4, ALIGN_BOTTOM_STRETCH, 60,60,60,255); // go 1 pixel past screen bottom to prevent gap from scaling
|
SCR_DrawFill (0, SCREEN_HEIGHT-(MENU_FONT_SIZE+3), SCREEN_WIDTH, MENU_FONT_SIZE+4, ALIGN_BOTTOM_STRETCH, 60, 60, 60, 255); // go 1 pixel past screen bottom to prevent gap from scaling
|
||||||
SCR_DrawFill (0, SCREEN_HEIGHT-(MENU_FONT_SIZE+3), SCREEN_WIDTH, 1, ALIGN_BOTTOM_STRETCH, 0,0,0,255);
|
SCR_DrawFill (0, SCREEN_HEIGHT-(MENU_FONT_SIZE+3), SCREEN_WIDTH, 1, ALIGN_BOTTOM_STRETCH, 0, 0, 0, 255);
|
||||||
SCR_DrawString (SCREEN_WIDTH/2-(len/2)*MENU_FONT_SIZE, SCREEN_HEIGHT-(MENU_FONT_SIZE+1), MENU_FONT_SIZE, ALIGN_BOTTOM, message, 255);
|
SCR_DrawString (SCREEN_WIDTH/2-(len/2)*MENU_FONT_SIZE, SCREEN_HEIGHT-(MENU_FONT_SIZE+1), MENU_FONT_SIZE, ALIGN_BOTTOM, message, FONT_SCREEN, 255);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ qboolean CL_StringSetParams (char modifier, int *red, int *green, int *blue, int
|
||||||
CL_DrawStringGeneric
|
CL_DrawStringGeneric
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void CL_DrawStringGeneric (int x, int y, const char *string, int alpha, int fontSize, textscaletype_t scaleType, qboolean altBit)
|
void CL_DrawStringGeneric (int x, int y, const char *string, fontslot_t font, int alpha, int fontSize, textscaletype_t scaleType, qboolean altBit)
|
||||||
{
|
{
|
||||||
unsigned i, j;
|
unsigned i, j;
|
||||||
int len, red, green, blue, italic, shadow, bold, reset;
|
int len, red, green, blue, italic, shadow, bold, reset;
|
||||||
|
@ -192,8 +192,8 @@ void CL_DrawStringGeneric (int x, int y, const char *string, int alpha, int font
|
||||||
|
|
||||||
if (shadow)
|
if (shadow)
|
||||||
R_DrawChar( ( x + (j-1)*textSize+textSize/4 ), y+(textSize/8),
|
R_DrawChar( ( x + (j-1)*textSize+textSize/4 ), y+(textSize/8),
|
||||||
character, textScale, 0, 0, 0, alpha, italic, false );
|
character, font, textScale, 0, 0, 0, alpha, italic, false );
|
||||||
R_DrawChar( ( x + (j-1)*textSize ), y,
|
R_DrawChar( ( x + (j-1)*textSize ), y,
|
||||||
character, textScale, red, green, blue, alpha, italic, flushChar );
|
character, font, textScale, red, green, blue, alpha, italic, flushChar );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -559,8 +559,8 @@ extern netadr_t net_from;
|
||||||
extern sizebuf_t net_message;
|
extern sizebuf_t net_message;
|
||||||
|
|
||||||
qboolean CL_StringSetParams (char modifier, int *red, int *green, int *blue, int *bold, int *shadow, int *italic, int *reset);
|
qboolean CL_StringSetParams (char modifier, int *red, int *green, int *blue, int *bold, int *shadow, int *italic, int *reset);
|
||||||
void Con_DrawString (int x, int y, char *s, int alpha);
|
void Con_DrawString (int x, int y, char *s, fontslot_t font, int alpha);
|
||||||
void CL_DrawStringGeneric (int x, int y, const char *string, int alpha, int fontSize, textscaletype_t scaleType, qboolean altBit);
|
void CL_DrawStringGeneric (int x, int y, const char *string, fontslot_t font, int alpha, int fontSize, textscaletype_t scaleType, qboolean altBit);
|
||||||
|
|
||||||
// cl_scrn.c
|
// cl_scrn.c
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -769,7 +769,10 @@ void R_DrawPic (int x, int y, char *name);
|
||||||
void R_DrawStretchPic (int x, int y, int w, int h, char *name, float alpha);
|
void R_DrawStretchPic (int x, int y, int w, int h, char *name, float alpha);
|
||||||
void R_DrawScaledPic (int x, int y, float scale, float alpha, char *name);
|
void R_DrawScaledPic (int x, int y, float scale, float alpha, char *name);
|
||||||
// added char scaling from Quake2Max
|
// added char scaling from Quake2Max
|
||||||
void R_DrawChar (float x, float y, int c, float scale, int red, int green, int blue, int alpha, qboolean italic, qboolean last);
|
void R_DrawChar (float x, float y, int c, fontslot_t font, float scale,
|
||||||
|
int red, int green, int blue, int alpha, qboolean italic, qboolean last);
|
||||||
|
void R_DrawString (float x, float y, const char *string, fontslot_t font, float scale,
|
||||||
|
int red, int green, int blue, int alpha, qboolean italic, qboolean shadow);
|
||||||
void R_DrawTileClear (int x, int y, int w, int h, char *name);
|
void R_DrawTileClear (int x, int y, int w, int h, char *name);
|
||||||
void R_DrawFill (int x, int y, int w, int h, int red, int green, int blue, int alpha);
|
void R_DrawFill (int x, int y, int w, int h, int red, int green, int blue, int alpha);
|
||||||
void R_DrawCameraEffect (void);
|
void R_DrawCameraEffect (void);
|
||||||
|
|
|
@ -68,6 +68,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
#define SHELL_WHITE_COLOR 0xD7
|
#define SHELL_WHITE_COLOR 0xD7
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
FONT_CONSOLE,
|
||||||
|
FONT_SCREEN,
|
||||||
|
FONT_UI
|
||||||
|
} fontslot_t;
|
||||||
|
|
||||||
|
|
||||||
typedef struct entity_s
|
typedef struct entity_s
|
||||||
{
|
{
|
||||||
struct model_s *model; // opaque type outside refresh
|
struct model_s *model; // opaque type outside refresh
|
||||||
|
|
|
@ -125,8 +125,8 @@ float SCR_GetScreenScale (void);
|
||||||
void SCR_AdjustFrom640 (float *x, float *y, float *w, float *h, scralign_t align);
|
void SCR_AdjustFrom640 (float *x, float *y, float *w, float *h, scralign_t align);
|
||||||
void SCR_DrawFill (float x, float y, float width, float height, scralign_t align, int red, int green, int blue, int alpha);
|
void SCR_DrawFill (float x, float y, float width, float height, scralign_t align, int red, int green, int blue, int alpha);
|
||||||
void SCR_DrawPic (float x, float y, float width, float height, scralign_t align, char *pic, float alpha);
|
void SCR_DrawPic (float x, float y, float width, float height, scralign_t align, char *pic, float alpha);
|
||||||
void SCR_DrawChar (float x, float y, int size, scralign_t align, int num, int red, int green, int blue, int alpha, qboolean italic, qboolean last);
|
void SCR_DrawChar (float x, float y, int size, scralign_t align, int num, fontslot_t font, int red, int green, int blue, int alpha, qboolean italic, qboolean last);
|
||||||
void SCR_DrawString (float x, float y, int size, scralign_t align, const char *string, int alpha);
|
void SCR_DrawString (float x, float y, int size, scralign_t align, const char *string, fontslot_t font, int alpha);
|
||||||
void SCR_DrawCrosshair (void);
|
void SCR_DrawCrosshair (void);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -25,6 +25,9 @@ Changes as of v0.20 update 8:
|
||||||
|
|
||||||
- Added horizontal offset to third-person mode. Offset distance is controlled by cvar cg_thirdperson_offset.
|
- Added horizontal offset to third-person mode. Offset distance is controlled by cvar cg_thirdperson_offset.
|
||||||
|
|
||||||
|
- Added separate cvars ui_font and scr_font for menu and screen fonts, respectively. Con_font now only
|
||||||
|
changes the font in the console.
|
||||||
|
|
||||||
- Added font upscaling (with optional blending by Skuller from Q2Pro) for old 128x128 fonts. Use cvar r_font_upscale to enable,
|
- Added font upscaling (with optional blending by Skuller from Q2Pro) for old 128x128 fonts. Use cvar r_font_upscale to enable,
|
||||||
value of 1 is pixel copy, value of 2 enables blending. Requires vid_restart for changes to take effect.
|
value of 1 is pixel copy, value of 2 enables blending. Requires vid_restart for changes to take effect.
|
||||||
|
|
||||||
|
|
|
@ -24,26 +24,104 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
#include "r_local.h"
|
#include "r_local.h"
|
||||||
|
|
||||||
image_t *draw_chars;
|
image_t *r_con_draw_chars;
|
||||||
|
image_t *r_scr_draw_chars;
|
||||||
|
image_t *r_ui_draw_chars;
|
||||||
|
|
||||||
extern qboolean scrap_dirty;
|
extern qboolean scrap_dirty;
|
||||||
void Scrap_Upload (void);
|
void Scrap_Upload (void);
|
||||||
|
|
||||||
#define DEFAULT_FONT_SIZE 8.0f
|
#define DEFAULT_FONT_SIZE 8.0f
|
||||||
|
|
||||||
void RefreshFont (void)
|
void R_RefreshFont (fontslot_t font)
|
||||||
{
|
{
|
||||||
con_font->modified = false;
|
cvar_t *fontvar;
|
||||||
|
image_t *fontimage;
|
||||||
|
|
||||||
draw_chars = R_FindImage (va("fonts/%s.pcx", con_font->string), it_font); // was it_pic
|
switch (font)
|
||||||
if (!draw_chars) // fall back on default font
|
{
|
||||||
draw_chars = R_FindImage ("fonts/default.pcx", it_font); // was it_pic
|
case FONT_SCREEN:
|
||||||
if (!draw_chars) // fall back on old Q2 conchars
|
fontvar = scr_font;
|
||||||
draw_chars = R_FindImage ("pics/conchars.pcx", it_font); // was it_pic
|
break;
|
||||||
if (!draw_chars) // prevent crash caused by missing font
|
case FONT_UI:
|
||||||
|
fontvar = ui_font;
|
||||||
|
break;
|
||||||
|
case FONT_CONSOLE:
|
||||||
|
default:
|
||||||
|
fontvar = con_font;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
fontvar->modified = false;
|
||||||
|
|
||||||
|
fontimage = R_FindImage (va("fonts/%s.pcx", fontvar->string), it_font); // was it_pic
|
||||||
|
if (!fontimage) // fall back on default font
|
||||||
|
fontimage = R_FindImage ("fonts/default.pcx", it_font); // was it_pic
|
||||||
|
if (!fontimage) // fall back on old Q2 conchars
|
||||||
|
fontimage = R_FindImage ("pics/conchars.pcx", it_font); // was it_pic
|
||||||
|
if (!fontimage) // prevent crash caused by missing font
|
||||||
VID_Error (ERR_FATAL, "RefreshFont: couldn't load pics/conchars");
|
VID_Error (ERR_FATAL, "RefreshFont: couldn't load pics/conchars");
|
||||||
|
|
||||||
GL_Bind( draw_chars->texnum );
|
GL_Bind (fontimage->texnum);
|
||||||
|
|
||||||
|
switch (font)
|
||||||
|
{
|
||||||
|
case FONT_SCREEN:
|
||||||
|
r_scr_draw_chars = fontimage;
|
||||||
|
break;
|
||||||
|
case FONT_UI:
|
||||||
|
r_ui_draw_chars = fontimage;
|
||||||
|
break;
|
||||||
|
case FONT_CONSOLE:
|
||||||
|
default:
|
||||||
|
r_con_draw_chars = fontimage;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
===============
|
||||||
|
R_RefreshAllFonts
|
||||||
|
===============
|
||||||
|
*/
|
||||||
|
void R_RefreshAllFonts (void)
|
||||||
|
{
|
||||||
|
R_RefreshFont (FONT_CONSOLE);
|
||||||
|
R_RefreshFont (FONT_SCREEN);
|
||||||
|
R_RefreshFont (FONT_UI);
|
||||||
|
/*
|
||||||
|
con_font->modified = false;
|
||||||
|
|
||||||
|
r_con_draw_chars = R_FindImage (va("fonts/%s.pcx", con_font->string), it_pic);
|
||||||
|
if (!r_con_draw_chars) // fall back on default font
|
||||||
|
r_con_draw_chars = R_FindImage ("fonts/default.pcx", it_pic);
|
||||||
|
if (!r_con_draw_chars) // fall back on old Q2 conchars
|
||||||
|
r_con_draw_chars = R_FindImage ("pics/conchars.pcx", it_pic);
|
||||||
|
if (!r_con_draw_chars) // prevent crash caused by missing font
|
||||||
|
VID_Error (ERR_FATAL, "R_RefreshFont: couldn't load pics/conchars");
|
||||||
|
|
||||||
|
GL_Bind (r_con_draw_chars->texnum );
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
===============
|
||||||
|
R_ImageForFont
|
||||||
|
===============
|
||||||
|
*/
|
||||||
|
image_t *R_ImageForFont (fontslot_t font)
|
||||||
|
{
|
||||||
|
switch (font)
|
||||||
|
{
|
||||||
|
case FONT_SCREEN:
|
||||||
|
return r_scr_draw_chars;
|
||||||
|
case FONT_UI:
|
||||||
|
return r_ui_draw_chars;
|
||||||
|
case FONT_CONSOLE:
|
||||||
|
default:
|
||||||
|
return r_con_draw_chars;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,7 +138,7 @@ void R_DrawInitLocal (void)
|
||||||
qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
|
|
||||||
// load console characters (don't bilerp characters)
|
// load console characters (don't bilerp characters)
|
||||||
RefreshFont();
|
R_RefreshAllFonts ();
|
||||||
|
|
||||||
R_InitChars (); // init char indexes
|
R_InitChars (); // init char indexes
|
||||||
}
|
}
|
||||||
|
@ -73,7 +151,7 @@ R_CharMapScale
|
||||||
*/
|
*/
|
||||||
float R_CharMapScale (void)
|
float R_CharMapScale (void)
|
||||||
{
|
{
|
||||||
return (draw_chars->width/128.0); //current width / original width
|
return (r_con_draw_chars->width/128.0); //current width / original width
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -88,12 +166,13 @@ void R_InitChars (void)
|
||||||
char_count = 0;
|
char_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
R_FlushChars
|
R_FlushChars
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void R_FlushChars (void)
|
void R_FlushChars (fontslot_t font)
|
||||||
{
|
{
|
||||||
if (rb_vertex == 0 || rb_index == 0) // nothing to flush
|
if (rb_vertex == 0 || rb_index == 0) // nothing to flush
|
||||||
return;
|
return;
|
||||||
|
@ -102,7 +181,7 @@ void R_FlushChars (void)
|
||||||
GL_TexEnv (GL_MODULATE);
|
GL_TexEnv (GL_MODULATE);
|
||||||
GL_Enable (GL_BLEND);
|
GL_Enable (GL_BLEND);
|
||||||
GL_DepthMask (false);
|
GL_DepthMask (false);
|
||||||
GL_Bind(draw_chars->texnum);
|
GL_Bind((R_ImageForFont(font))->texnum);
|
||||||
|
|
||||||
RB_RenderMeshGeneric (false);
|
RB_RenderMeshGeneric (false);
|
||||||
char_count = 0;
|
char_count = 0;
|
||||||
|
@ -113,6 +192,7 @@ void R_FlushChars (void)
|
||||||
GL_Enable (GL_ALPHA_TEST);
|
GL_Enable (GL_ALPHA_TEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
R_DrawChar
|
R_DrawChar
|
||||||
|
@ -121,7 +201,7 @@ It can be clipped to the top of the screen to allow the console to be
|
||||||
smoothly scrolled off.
|
smoothly scrolled off.
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void R_DrawChar (float x, float y, int num, float scale,
|
void R_DrawChar (float x, float y, int num, fontslot_t font, float scale,
|
||||||
int red, int green, int blue, int alpha, qboolean italic, qboolean last)
|
int red, int green, int blue, int alpha, qboolean italic, qboolean last)
|
||||||
{
|
{
|
||||||
int row, col, i;
|
int row, col, i;
|
||||||
|
@ -167,7 +247,7 @@ void R_DrawChar (float x, float y, int num, float scale,
|
||||||
if (char_count == 0)
|
if (char_count == 0)
|
||||||
rb_vertex = rb_index = 0;
|
rb_vertex = rb_index = 0;
|
||||||
if (rb_vertex + 4 >= MAX_VERTICES || rb_index + 6 >= MAX_INDICES)
|
if (rb_vertex + 4 >= MAX_VERTICES || rb_index + 6 >= MAX_INDICES)
|
||||||
R_FlushChars ();
|
R_FlushChars (font);
|
||||||
indexArray[rb_index++] = rb_vertex+0;
|
indexArray[rb_index++] = rb_vertex+0;
|
||||||
indexArray[rb_index++] = rb_vertex+1;
|
indexArray[rb_index++] = rb_vertex+1;
|
||||||
indexArray[rb_index++] = rb_vertex+2;
|
indexArray[rb_index++] = rb_vertex+2;
|
||||||
|
@ -183,7 +263,35 @@ void R_DrawChar (float x, float y, int num, float scale,
|
||||||
char_count++;
|
char_count++;
|
||||||
}
|
}
|
||||||
if (last)
|
if (last)
|
||||||
R_FlushChars ();
|
R_FlushChars (font);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
================
|
||||||
|
R_DrawString
|
||||||
|
Draws a string of variable sized graphics characters.
|
||||||
|
================
|
||||||
|
*/
|
||||||
|
void R_DrawString (float x, float y, const char *string, fontslot_t font, float scale,
|
||||||
|
int red, int green, int blue, int alpha, qboolean italic, qboolean shadow)
|
||||||
|
|
||||||
|
{
|
||||||
|
int i, len;
|
||||||
|
float size = scale * DEFAULT_FONT_SIZE;
|
||||||
|
|
||||||
|
len = (int)strlen(string);
|
||||||
|
if (len < 1) // nothing to draw
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (shadow) {
|
||||||
|
for (i=0; i<len; i++)
|
||||||
|
R_DrawChar ( (x + i*size+size*0.25), y+(size*0.125),
|
||||||
|
string[i], font, scale, 0, 0, 0, alpha, italic, false );
|
||||||
|
}
|
||||||
|
for (i=0; i<len; i++)
|
||||||
|
R_DrawChar ( (x + i*size), y,
|
||||||
|
string[i], font, scale, red, green, blue, alpha, italic, (i==(len-1)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -512,10 +512,10 @@ GL_Bind
|
||||||
*/
|
*/
|
||||||
void GL_Bind (int texnum)
|
void GL_Bind (int texnum)
|
||||||
{
|
{
|
||||||
extern image_t *draw_chars;
|
extern image_t *r_con_draw_chars;
|
||||||
|
|
||||||
if (r_nobind->integer && draw_chars) // performance evaluation option
|
if (r_nobind->integer && r_con_draw_chars) // performance evaluation option
|
||||||
texnum = draw_chars->texnum;
|
texnum = r_con_draw_chars->texnum;
|
||||||
if (glState.currenttextures[glState.currenttmu] == texnum)
|
if (glState.currenttextures[glState.currenttmu] == texnum)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -249,8 +249,11 @@ extern cvar_t *r_lightlevel; // FIXME: This is a HACK to get the client's light
|
||||||
extern cvar_t *r_rgbscale;
|
extern cvar_t *r_rgbscale;
|
||||||
|
|
||||||
// Knightmare- added Psychospaz's console font size option
|
// Knightmare- added Psychospaz's console font size option
|
||||||
extern cvar_t *con_font;
|
|
||||||
extern cvar_t *con_font_size;
|
extern cvar_t *con_font_size;
|
||||||
|
extern cvar_t *con_font;
|
||||||
|
extern cvar_t *scr_font;
|
||||||
|
extern cvar_t *ui_font;
|
||||||
|
extern cvar_t *alt_text_color;
|
||||||
|
|
||||||
//extern cvar_t *r_vertex_arrays; // unused
|
//extern cvar_t *r_vertex_arrays; // unused
|
||||||
|
|
||||||
|
@ -669,6 +672,8 @@ char *va(char *format, ...);
|
||||||
//
|
//
|
||||||
// r_draw.c
|
// r_draw.c
|
||||||
//
|
//
|
||||||
|
void R_RefreshFont (fontslot_t font);
|
||||||
|
void R_RefreshAllFonts (void);
|
||||||
void R_DrawGetPicSize (int *w, int *h, char *name);
|
void R_DrawGetPicSize (int *w, int *h, char *name);
|
||||||
void R_DrawPic (int x, int y, char *name);
|
void R_DrawPic (int x, int y, char *name);
|
||||||
// added alpha for Psychospaz's transparent console
|
// added alpha for Psychospaz's transparent console
|
||||||
|
@ -676,9 +681,11 @@ void R_DrawStretchPic (int x, int y, int w, int h, char *name, float alpha);
|
||||||
// Psychospaz's scaled crosshair support
|
// Psychospaz's scaled crosshair support
|
||||||
void R_DrawScaledPic (int x, int y, float scale, float alpha, char *pic);
|
void R_DrawScaledPic (int x, int y, float scale, float alpha, char *pic);
|
||||||
void R_InitChars (void);
|
void R_InitChars (void);
|
||||||
void R_FlushChars (void);
|
void R_FlushChars (fontslot_t font);
|
||||||
void R_DrawChar (float x, float y, int num, float scale,
|
void R_DrawChar (float x, float y, int num, fontslot_t font, float scale,
|
||||||
int red, int green, int blue, int alpha, qboolean italic, qboolean last);
|
int red, int green, int blue, int alpha, qboolean italic, qboolean last);
|
||||||
|
void R_DrawString (float x, float y, const char *string, fontslot_t font, float scale,
|
||||||
|
int red, int green, int blue, int alpha, qboolean italic, qboolean shadow);
|
||||||
void R_DrawTileClear (int x, int y, int w, int h, char *name);
|
void R_DrawTileClear (int x, int y, int w, int h, char *name);
|
||||||
void R_DrawFill (int x, int y, int w, int h, int red, int green, int blue, int alpha);
|
void R_DrawFill (int x, int y, int w, int h, int red, int green, int blue, int alpha);
|
||||||
float R_CharMapScale (void);
|
float R_CharMapScale (void);
|
||||||
|
|
|
@ -79,9 +79,13 @@ cvar_t *gl_allow_software;
|
||||||
cvar_t *gl_driver;
|
cvar_t *gl_driver;
|
||||||
cvar_t *gl_clear;
|
cvar_t *gl_clear;
|
||||||
|
|
||||||
cvar_t *con_font; // Psychospaz's console font size option
|
// Psychospaz's console font size option
|
||||||
cvar_t *con_font_size;
|
cvar_t *con_font_size;
|
||||||
|
cvar_t *con_font;
|
||||||
|
cvar_t *scr_font;
|
||||||
|
cvar_t *ui_font;
|
||||||
cvar_t *alt_text_color;
|
cvar_t *alt_text_color;
|
||||||
|
|
||||||
cvar_t *scr_netgraph_pos;
|
cvar_t *scr_netgraph_pos;
|
||||||
|
|
||||||
cvar_t *r_norefresh;
|
cvar_t *r_norefresh;
|
||||||
|
@ -735,15 +739,63 @@ void R_RenderView (refdef_t *fd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define SCREEN_WIDTH 640.0f
|
||||||
|
#define SCREEN_HEIGHT 480.0f
|
||||||
|
/*
|
||||||
|
================
|
||||||
|
R_ShowSpeeds
|
||||||
|
|
||||||
|
Knightmare- draws r_speeds (modified from Echon's tutorial)
|
||||||
|
================
|
||||||
|
*/
|
||||||
|
void R_ShowSpeeds (void)
|
||||||
|
{
|
||||||
|
char buf[128];
|
||||||
|
int i, /*j,*/ lines, x, y, n = 0;
|
||||||
|
float textSize, textScale;
|
||||||
|
|
||||||
|
if (!r_speeds->integer || r_newrefdef.rdflags & RDF_NOWORLDMODEL) // don't do this for options menu
|
||||||
|
return;
|
||||||
|
|
||||||
|
lines = 5; // 7
|
||||||
|
|
||||||
|
textScale = min( ((float)r_newrefdef.width / SCREEN_WIDTH), ((float)r_newrefdef.height / SCREEN_HEIGHT) );
|
||||||
|
textSize = 8.0 * textScale;
|
||||||
|
|
||||||
|
for (i=0; i<lines; i++)
|
||||||
|
{
|
||||||
|
switch (i) {
|
||||||
|
case 0: n = sprintf (buf, "%5i wcall", c_brush_calls); break;
|
||||||
|
case 1: n = sprintf (buf, "%5i wsurf", c_brush_surfs); break;
|
||||||
|
case 2: n = sprintf (buf, "%5i wpoly", c_brush_polys); break;
|
||||||
|
case 3: n = sprintf (buf, "%5i epoly", c_alias_polys); break;
|
||||||
|
case 4: n = sprintf (buf, "%5i ppoly", c_part_polys); break;
|
||||||
|
// case 5: n = sprintf (buf, "%5i tex ", c_visible_textures); break;
|
||||||
|
// case 6: n = sprintf (buf, "%5i lmaps", c_visible_lightmaps); break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
if (scr_netgraph_pos->integer)
|
||||||
|
x = r_newrefdef.width - (n*textSize + textSize*0.5);
|
||||||
|
else
|
||||||
|
x = textSize*0.5;
|
||||||
|
y = r_newrefdef.height-(lines-i)*(textSize+2);
|
||||||
|
|
||||||
|
R_DrawString (x, y, buf, FONT_SCREEN, textScale, 255, 255, 255, 255, false, true);
|
||||||
|
/* for (j=0; j<n; j++)
|
||||||
|
R_DrawChar ( (x + j*textSize + textSize*0.25), (y + textSize*0.125),
|
||||||
|
buf[j], FONT_SCREEN, textScale, 0, 0, 0, 255, false, false );
|
||||||
|
for (j=0; j<n; j++)
|
||||||
|
R_DrawChar ( (x + j*textSize), y,
|
||||||
|
buf[j], FONT_SCREEN, textScale, 255, 255, 255, 255, false, (j==(n-1)) );
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
R_SetGL2D
|
R_SetGL2D
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void Con_DrawString (int x, int y, char *string, int alpha);
|
|
||||||
float SCR_ScaledScreen (float param);
|
|
||||||
#define FONT_SIZE SCR_ScaledScreen(con_font_size->value)
|
|
||||||
|
|
||||||
void R_SetGL2D (void)
|
void R_SetGL2D (void)
|
||||||
{
|
{
|
||||||
// set 2D virtual screen size
|
// set 2D virtual screen size
|
||||||
|
@ -759,34 +811,7 @@ void R_SetGL2D (void)
|
||||||
GL_Enable (GL_ALPHA_TEST);
|
GL_Enable (GL_ALPHA_TEST);
|
||||||
qglColor4f (1,1,1,1);
|
qglColor4f (1,1,1,1);
|
||||||
|
|
||||||
// Knightmare- draw r_speeds (modified from Echon's tutorial)
|
R_ShowSpeeds ();
|
||||||
if (r_speeds->integer && !(r_newrefdef.rdflags & RDF_NOWORLDMODEL)) // don't do this for options menu
|
|
||||||
{
|
|
||||||
char S[128];
|
|
||||||
int lines, i, x, y, n = 0;
|
|
||||||
|
|
||||||
lines = (glConfig.multitexture)?5:7;
|
|
||||||
|
|
||||||
for (i=0; i<lines; i++)
|
|
||||||
{
|
|
||||||
switch (i) {
|
|
||||||
case 0: n = sprintf (S, S_COLOR_ALT S_COLOR_SHADOW"%5i wcall", c_brush_calls); break;
|
|
||||||
case 1: n = sprintf (S, S_COLOR_ALT S_COLOR_SHADOW"%5i wsurf", c_brush_surfs); break;
|
|
||||||
case 2: n = sprintf (S, S_COLOR_ALT S_COLOR_SHADOW"%5i wpoly", c_brush_polys); break;
|
|
||||||
case 3: n = sprintf (S, S_COLOR_ALT S_COLOR_SHADOW"%5i epoly", c_alias_polys); break;
|
|
||||||
case 4: n = sprintf (S, S_COLOR_ALT S_COLOR_SHADOW"%5i ppoly", c_part_polys); break;
|
|
||||||
case 5: n = sprintf (S, S_COLOR_ALT S_COLOR_SHADOW"%5i tex ", c_visible_textures); break;
|
|
||||||
case 6: n = sprintf (S, S_COLOR_ALT S_COLOR_SHADOW"%5i lmaps", c_visible_lightmaps); break;
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
if (scr_netgraph_pos->integer)
|
|
||||||
x = r_newrefdef.width - (n*FONT_SIZE + FONT_SIZE/2);
|
|
||||||
else
|
|
||||||
x = FONT_SIZE/2;
|
|
||||||
y = r_newrefdef.height-(lines-i)*(FONT_SIZE+2);
|
|
||||||
Con_DrawString (x, y, S, 255);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -917,10 +942,14 @@ void AssertCvarRange (cvar_t *var, float min, float max, qboolean isInteger)
|
||||||
void R_Register (void)
|
void R_Register (void)
|
||||||
{
|
{
|
||||||
// added Psychospaz's console font size option
|
// added Psychospaz's console font size option
|
||||||
con_font = Cvar_Get ("con_font", "default", CVAR_ARCHIVE);
|
|
||||||
Cvar_SetDescription ("con_font", "Sets name of font image for console/HUD/menu text.");
|
|
||||||
con_font_size = Cvar_Get ("con_font_size", "8", CVAR_ARCHIVE);
|
con_font_size = Cvar_Get ("con_font_size", "8", CVAR_ARCHIVE);
|
||||||
// Cvar_SetDescription ("con_font_size", "Sets size of console font. Values > 8 are larger than default, < 8 are smaller.");
|
// Cvar_SetDescription ("con_font_size", "Sets size of console font. Values > 8 are larger than default, < 8 are smaller.");
|
||||||
|
con_font = Cvar_Get ("con_font", "default", CVAR_ARCHIVE);
|
||||||
|
Cvar_SetDescription ("con_font", "Sets name of font image for console text.");
|
||||||
|
scr_font = Cvar_Get ("scr_font", "default", CVAR_ARCHIVE);
|
||||||
|
Cvar_SetDescription ("scr_font", "Sets name of font image for HUD text.");
|
||||||
|
ui_font = Cvar_Get ("ui_font", "default", CVAR_ARCHIVE);
|
||||||
|
Cvar_SetDescription ("ui_font", "Sets name of font image for menu text.");
|
||||||
alt_text_color = Cvar_Get ("alt_text_color", "2", CVAR_ARCHIVE);
|
alt_text_color = Cvar_Get ("alt_text_color", "2", CVAR_ARCHIVE);
|
||||||
// Cvar_SetDescription ("alt_text_color", "Sets color of high-bit highlighted text.");
|
// Cvar_SetDescription ("alt_text_color", "Sets color of high-bit highlighted text.");
|
||||||
|
|
||||||
|
@ -2130,7 +2159,11 @@ void R_BeginFrame( float camera_separation )
|
||||||
|
|
||||||
// Knightmare- added Psychospaz's console font size option
|
// Knightmare- added Psychospaz's console font size option
|
||||||
if (con_font->modified)
|
if (con_font->modified)
|
||||||
RefreshFont ();
|
R_RefreshFont (FONT_CONSOLE);
|
||||||
|
if (scr_font->modified)
|
||||||
|
R_RefreshFont (FONT_SCREEN);
|
||||||
|
if (ui_font->modified)
|
||||||
|
R_RefreshFont (FONT_UI);
|
||||||
|
|
||||||
if (con_font_size->modified)
|
if (con_font_size->modified)
|
||||||
{
|
{
|
||||||
|
|
|
@ -142,20 +142,20 @@ void Field_Draw (menufield_s *f)
|
||||||
}
|
}
|
||||||
|
|
||||||
SCR_DrawChar (f->generic.x + f->generic.parent->x + RCOLUMN_OFFSET,
|
SCR_DrawChar (f->generic.x + f->generic.parent->x + RCOLUMN_OFFSET,
|
||||||
f->generic.y + f->generic.parent->y - 4, f->generic.textSize, ALIGN_CENTER, 18, 255,255,255,255, false, false);
|
f->generic.y + f->generic.parent->y - 4, f->generic.textSize, ALIGN_CENTER, 18, FONT_UI, 255,255,255,255, false, false);
|
||||||
SCR_DrawChar (f->generic.x + f->generic.parent->x + RCOLUMN_OFFSET,
|
SCR_DrawChar (f->generic.x + f->generic.parent->x + RCOLUMN_OFFSET,
|
||||||
f->generic.y + f->generic.parent->y + 4, f->generic.textSize, ALIGN_CENTER, 24, 255,255,255,255, false, false);
|
f->generic.y + f->generic.parent->y + 4, f->generic.textSize, ALIGN_CENTER, 24, FONT_UI, 255,255,255,255, false, false);
|
||||||
SCR_DrawChar (f->generic.x + f->generic.parent->x + (1+f->visible_length)*f->generic.textSize + RCOLUMN_OFFSET,
|
SCR_DrawChar (f->generic.x + f->generic.parent->x + (1+f->visible_length)*f->generic.textSize + RCOLUMN_OFFSET,
|
||||||
f->generic.y + f->generic.parent->y - 4, f->generic.textSize, ALIGN_CENTER, 20,255,255,255,255, false, false);
|
f->generic.y + f->generic.parent->y - 4, f->generic.textSize, ALIGN_CENTER, 20, FONT_UI, 255,255,255,255, false, false);
|
||||||
SCR_DrawChar (f->generic.x + f->generic.parent->x + (1+f->visible_length)*f->generic.textSize + RCOLUMN_OFFSET,
|
SCR_DrawChar (f->generic.x + f->generic.parent->x + (1+f->visible_length)*f->generic.textSize + RCOLUMN_OFFSET,
|
||||||
f->generic.y + f->generic.parent->y + 4, f->generic.textSize, ALIGN_CENTER, 26, 255,255,255,255, false, false);
|
f->generic.y + f->generic.parent->y + 4, f->generic.textSize, ALIGN_CENTER, 26, FONT_UI, 255,255,255,255, false, false);
|
||||||
|
|
||||||
for (i = 0; i < f->visible_length; i++)
|
for (i = 0; i < f->visible_length; i++)
|
||||||
{
|
{
|
||||||
SCR_DrawChar (f->generic.x + f->generic.parent->x + (1+i)*f->generic.textSize + RCOLUMN_OFFSET,
|
SCR_DrawChar (f->generic.x + f->generic.parent->x + (1+i)*f->generic.textSize + RCOLUMN_OFFSET,
|
||||||
f->generic.y + f->generic.parent->y - 4, f->generic.textSize, ALIGN_CENTER, 19, 255,255,255,255, false, false);
|
f->generic.y + f->generic.parent->y - 4, f->generic.textSize, ALIGN_CENTER, 19, FONT_UI, 255,255,255,255, false, false);
|
||||||
SCR_DrawChar (f->generic.x + f->generic.parent->x + (1+i)*f->generic.textSize + RCOLUMN_OFFSET,
|
SCR_DrawChar (f->generic.x + f->generic.parent->x + (1+i)*f->generic.textSize + RCOLUMN_OFFSET,
|
||||||
f->generic.y + f->generic.parent->y + 4, f->generic.textSize, ALIGN_CENTER, 25, 255,255,255,255, false, (i==(f->visible_length-1)));
|
f->generic.y + f->generic.parent->y + 4, f->generic.textSize, ALIGN_CENTER, 25, FONT_UI, 255,255,255,255, false, (i==(f->visible_length-1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// add cursor thingie
|
// add cursor thingie
|
||||||
|
@ -374,17 +374,17 @@ void Slider_Draw (menuslider_s *s)
|
||||||
s->range = 1;
|
s->range = 1;
|
||||||
|
|
||||||
SCR_DrawChar (s->generic.x + s->generic.parent->x + RCOLUMN_OFFSET,
|
SCR_DrawChar (s->generic.x + s->generic.parent->x + RCOLUMN_OFFSET,
|
||||||
s->generic.y + s->generic.parent->y, s->generic.textSize, ALIGN_CENTER, 128, 255,255,255,255, false, false);
|
s->generic.y + s->generic.parent->y, s->generic.textSize, ALIGN_CENTER, 128, FONT_UI, 255,255,255,255, false, false);
|
||||||
|
|
||||||
for (i = 0; i < SLIDER_RANGE; i++)
|
for (i = 0; i < SLIDER_RANGE; i++)
|
||||||
SCR_DrawChar (s->generic.x + s->generic.parent->x + (i+1)*s->generic.textSize + RCOLUMN_OFFSET,
|
SCR_DrawChar (s->generic.x + s->generic.parent->x + (i+1)*s->generic.textSize + RCOLUMN_OFFSET,
|
||||||
s->generic.y + s->generic.parent->y, s->generic.textSize, ALIGN_CENTER, 129, 255,255,255,255, false, false);
|
s->generic.y + s->generic.parent->y, s->generic.textSize, ALIGN_CENTER, 129, FONT_UI, 255,255,255,255, false, false);
|
||||||
|
|
||||||
SCR_DrawChar (s->generic.x + s->generic.parent->x + (i+1)*s->generic.textSize + RCOLUMN_OFFSET,
|
SCR_DrawChar (s->generic.x + s->generic.parent->x + (i+1)*s->generic.textSize + RCOLUMN_OFFSET,
|
||||||
s->generic.y + s->generic.parent->y, s->generic.textSize, ALIGN_CENTER, 130, 255,255,255,255, false, false);
|
s->generic.y + s->generic.parent->y, s->generic.textSize, ALIGN_CENTER, 130, FONT_UI, 255,255,255,255, false, false);
|
||||||
|
|
||||||
SCR_DrawChar (s->generic.x + s->generic.parent->x + s->generic.textSize*((SLIDER_RANGE-1)*s->range+1) + RCOLUMN_OFFSET,
|
SCR_DrawChar (s->generic.x + s->generic.parent->x + s->generic.textSize*((SLIDER_RANGE-1)*s->range+1) + RCOLUMN_OFFSET,
|
||||||
s->generic.y + s->generic.parent->y, s->generic.textSize, ALIGN_CENTER, 131, 255,255,255,255, false, true);
|
s->generic.y + s->generic.parent->y, s->generic.textSize, ALIGN_CENTER, 131, FONT_UI, 255,255,255,255, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpinControl_DoEnter (menulist_s *s)
|
void SpinControl_DoEnter (menulist_s *s)
|
||||||
|
@ -787,14 +787,14 @@ void Menu_Draw (menuframework_s *menu)
|
||||||
SCR_DrawChar (menu->x+item->x+item->cursor_offset-24, menu->y+item->y,
|
SCR_DrawChar (menu->x+item->x+item->cursor_offset-24, menu->y+item->y,
|
||||||
// MENU_FONT_SIZE, ALIGN_CENTER, 12+((int)(Sys_Milliseconds()/250)&1),
|
// MENU_FONT_SIZE, ALIGN_CENTER, 12+((int)(Sys_Milliseconds()/250)&1),
|
||||||
item->textSize, ALIGN_CENTER, 12+((int)(Sys_Milliseconds()/250)&1),
|
item->textSize, ALIGN_CENTER, 12+((int)(Sys_Milliseconds()/250)&1),
|
||||||
255,255,255,255, false, true);
|
FONT_UI, 255,255,255,255, false, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SCR_DrawChar (menu->x+item->cursor_offset, menu->y+item->y,
|
SCR_DrawChar (menu->x+item->cursor_offset, menu->y+item->y,
|
||||||
// MENU_FONT_SIZE, ALIGN_CENTER, 12+((int)(Sys_Milliseconds()/250)&1),
|
// MENU_FONT_SIZE, ALIGN_CENTER, 12+((int)(Sys_Milliseconds()/250)&1),
|
||||||
item->textSize, ALIGN_CENTER, 12+((int)(Sys_Milliseconds()/250)&1),
|
item->textSize, ALIGN_CENTER, 12+((int)(Sys_Milliseconds()/250)&1),
|
||||||
255,255,255,255, false, true);
|
FONT_UI, 255,255,255,255, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -817,17 +817,17 @@ void Menu_DrawStatusBar (const char *string)
|
||||||
{
|
{
|
||||||
int l = (int)strlen( string );
|
int l = (int)strlen( string );
|
||||||
|
|
||||||
SCR_DrawFill( 0, SCREEN_HEIGHT-(MENU_FONT_SIZE+3), SCREEN_WIDTH, MENU_FONT_SIZE+4, ALIGN_BOTTOM_STRETCH, 60,60,60,255 ); // go 1 pixel past screen bottom to prevent gap from scaling
|
SCR_DrawFill (0, SCREEN_HEIGHT-(MENU_FONT_SIZE+3), SCREEN_WIDTH, MENU_FONT_SIZE+4, ALIGN_BOTTOM_STRETCH, 60,60,60,255 ); // go 1 pixel past screen bottom to prevent gap from scaling
|
||||||
SCR_DrawFill( 0, SCREEN_HEIGHT-(MENU_FONT_SIZE+3), SCREEN_WIDTH, 1, ALIGN_BOTTOM_STRETCH, 0,0,0,255 );
|
SCR_DrawFill (0, SCREEN_HEIGHT-(MENU_FONT_SIZE+3), SCREEN_WIDTH, 1, ALIGN_BOTTOM_STRETCH, 0,0,0,255 );
|
||||||
SCR_DrawString( SCREEN_WIDTH/2-(l/2)*MENU_FONT_SIZE, SCREEN_HEIGHT-(MENU_FONT_SIZE+1), MENU_FONT_SIZE, ALIGN_BOTTOM, string, 255 );
|
SCR_DrawString (SCREEN_WIDTH/2-(l/2)*MENU_FONT_SIZE, SCREEN_HEIGHT-(MENU_FONT_SIZE+1), MENU_FONT_SIZE, ALIGN_BOTTOM, string, FONT_UI, 255 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
SCR_DrawFill( 0, SCREEN_HEIGHT-(MENU_FONT_SIZE+3), SCREEN_WIDTH, MENU_FONT_SIZE+4, ALIGN_BOTTOM_STRETCH, 0,0,0,255 ); // go 1 pixel past screen bottom to prevent gap from scaling
|
SCR_DrawFill (0, SCREEN_HEIGHT-(MENU_FONT_SIZE+3), SCREEN_WIDTH, MENU_FONT_SIZE+4, ALIGN_BOTTOM_STRETCH, 0,0,0,255 ); // go 1 pixel past screen bottom to prevent gap from scaling
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu_DrawString (int x, int y, int size, const char *string, int alpha)
|
void Menu_DrawString (int x, int y, int size, const char *string, int alpha)
|
||||||
{
|
{
|
||||||
SCR_DrawString (x, y, size, ALIGN_CENTER, string, alpha);
|
SCR_DrawString (x, y, size, ALIGN_CENTER, string, FONT_UI, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu_DrawStringDark (int x, int y, int size, const char *string, int alpha)
|
void Menu_DrawStringDark (int x, int y, int size, const char *string, int alpha)
|
||||||
|
@ -835,13 +835,13 @@ void Menu_DrawStringDark (int x, int y, int size, const char *string, int alpha)
|
||||||
char newstring[1024];
|
char newstring[1024];
|
||||||
|
|
||||||
Com_sprintf (newstring, sizeof(newstring), S_COLOR_ALT"%s", string);
|
Com_sprintf (newstring, sizeof(newstring), S_COLOR_ALT"%s", string);
|
||||||
SCR_DrawString (x, y, size, ALIGN_CENTER, newstring, alpha);
|
SCR_DrawString (x, y, size, ALIGN_CENTER, newstring, FONT_UI, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu_DrawStringR2L (int x, int y, int size, const char *string, int alpha)
|
void Menu_DrawStringR2L (int x, int y, int size, const char *string, int alpha)
|
||||||
{
|
{
|
||||||
x -= stringLen(string)*size; // MENU_FONT_SIZE
|
x -= stringLen(string)*size; // MENU_FONT_SIZE
|
||||||
SCR_DrawString (x, y, size, ALIGN_CENTER, string, alpha);
|
SCR_DrawString (x, y, size, ALIGN_CENTER, string, FONT_UI, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu_DrawStringR2LDark (int x, int y, int size, const char *string, int alpha)
|
void Menu_DrawStringR2LDark (int x, int y, int size, const char *string, int alpha)
|
||||||
|
@ -850,7 +850,7 @@ void Menu_DrawStringR2LDark (int x, int y, int size, const char *string, int alp
|
||||||
|
|
||||||
Com_sprintf (newstring, sizeof(newstring), S_COLOR_ALT"%s", string);
|
Com_sprintf (newstring, sizeof(newstring), S_COLOR_ALT"%s", string);
|
||||||
x -= stringLen(string)*size; // MENU_FONT_SIZE
|
x -= stringLen(string)*size; // MENU_FONT_SIZE
|
||||||
SCR_DrawString (x, y, size, ALIGN_CENTER, newstring, alpha);
|
SCR_DrawString (x, y, size, ALIGN_CENTER, newstring, FONT_UI, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -867,36 +867,36 @@ void Menu_DrawTextBox (int x, int y, int width, int lines)
|
||||||
// draw left side
|
// draw left side
|
||||||
cx = x;
|
cx = x;
|
||||||
cy = y;
|
cy = y;
|
||||||
SCR_DrawChar (cx, cy, MENU_FONT_SIZE, ALIGN_CENTER, 1, 255,255,255,255, false, false);
|
SCR_DrawChar (cx, cy, MENU_FONT_SIZE, ALIGN_CENTER, 1, FONT_UI, 255,255,255,255, false, false);
|
||||||
for (n = 0; n < lines; n++) {
|
for (n = 0; n < lines; n++) {
|
||||||
cy += MENU_FONT_SIZE;
|
cy += MENU_FONT_SIZE;
|
||||||
SCR_DrawChar (cx, cy, MENU_FONT_SIZE, ALIGN_CENTER, 4, 255,255,255,255, false, false);
|
SCR_DrawChar (cx, cy, MENU_FONT_SIZE, ALIGN_CENTER, 4, FONT_UI, 255,255,255,255, false, false);
|
||||||
}
|
}
|
||||||
SCR_DrawChar (cx, cy+MENU_FONT_SIZE, MENU_FONT_SIZE, ALIGN_CENTER, 7, 255,255,255,255, false, false);
|
SCR_DrawChar (cx, cy+MENU_FONT_SIZE, MENU_FONT_SIZE, ALIGN_CENTER, 7, FONT_UI, 255,255,255,255, false, false);
|
||||||
|
|
||||||
// draw middle
|
// draw middle
|
||||||
cx += MENU_FONT_SIZE;
|
cx += MENU_FONT_SIZE;
|
||||||
while (width > 0)
|
while (width > 0)
|
||||||
{
|
{
|
||||||
cy = y;
|
cy = y;
|
||||||
SCR_DrawChar (cx, cy, MENU_FONT_SIZE, ALIGN_CENTER, 2, 255,255,255,255, false, false);
|
SCR_DrawChar (cx, cy, MENU_FONT_SIZE, ALIGN_CENTER, 2, FONT_UI, 255,255,255,255, false, false);
|
||||||
for (n = 0; n < lines; n++) {
|
for (n = 0; n < lines; n++) {
|
||||||
cy += MENU_FONT_SIZE;
|
cy += MENU_FONT_SIZE;
|
||||||
SCR_DrawChar (cx, cy, MENU_FONT_SIZE, ALIGN_CENTER, 5, 255,255,255,255, false, false);
|
SCR_DrawChar (cx, cy, MENU_FONT_SIZE, ALIGN_CENTER, 5, FONT_UI, 255,255,255,255, false, false);
|
||||||
}
|
}
|
||||||
SCR_DrawChar (cx, cy+MENU_FONT_SIZE, MENU_FONT_SIZE, ALIGN_CENTER, 8, 255,255,255,255, false, false);
|
SCR_DrawChar (cx, cy+MENU_FONT_SIZE, MENU_FONT_SIZE, ALIGN_CENTER, 8, FONT_UI, 255,255,255,255, false, false);
|
||||||
width -= 1;
|
width -= 1;
|
||||||
cx += MENU_FONT_SIZE;
|
cx += MENU_FONT_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw right side
|
// draw right side
|
||||||
cy = y;
|
cy = y;
|
||||||
SCR_DrawChar (cx, cy, MENU_FONT_SIZE, ALIGN_CENTER, 3, 255,255,255,255, false, false);
|
SCR_DrawChar (cx, cy, MENU_FONT_SIZE, ALIGN_CENTER, 3, FONT_UI, 255,255,255,255, false, false);
|
||||||
for (n = 0; n < lines; n++) {
|
for (n = 0; n < lines; n++) {
|
||||||
cy += MENU_FONT_SIZE;
|
cy += MENU_FONT_SIZE;
|
||||||
SCR_DrawChar (cx, cy, MENU_FONT_SIZE, ALIGN_CENTER, 6, 255,255,255,255, false, false);
|
SCR_DrawChar (cx, cy, MENU_FONT_SIZE, ALIGN_CENTER, 6, FONT_UI, 255,255,255,255, false, false);
|
||||||
}
|
}
|
||||||
SCR_DrawChar (cx, cy+MENU_FONT_SIZE, MENU_FONT_SIZE, ALIGN_CENTER, 9, 255,255,255,255, false, true);
|
SCR_DrawChar (cx, cy+MENU_FONT_SIZE, MENU_FONT_SIZE, ALIGN_CENTER, 9, FONT_UI, 255,255,255,255, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -200,9 +200,9 @@ void SearchLocalGames( void )
|
||||||
Q_strncpyz (local_server_names[i], NO_SERVER_STRING, sizeof(local_server_names[i]));
|
Q_strncpyz (local_server_names[i], NO_SERVER_STRING, sizeof(local_server_names[i]));
|
||||||
|
|
||||||
Menu_DrawTextBox (168, 192, 36, 3);
|
Menu_DrawTextBox (168, 192, 36, 3);
|
||||||
SCR_DrawString (188, 192+MENU_FONT_SIZE, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"Searching for local servers, this", 255);
|
SCR_DrawString (188, 192+MENU_FONT_SIZE, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"Searching for local servers, this", FONT_UI, 255);
|
||||||
SCR_DrawString (188, 192+MENU_FONT_SIZE*2, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"could take up to a minute, so", 255);
|
SCR_DrawString (188, 192+MENU_FONT_SIZE*2, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"could take up to a minute, so", FONT_UI, 255);
|
||||||
SCR_DrawString (188, 192+MENU_FONT_SIZE*3, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"please be patient.", 255);
|
SCR_DrawString (188, 192+MENU_FONT_SIZE*3, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"please be patient.", FONT_UI, 255);
|
||||||
|
|
||||||
// the text box won't show up unless we do a buffer swap
|
// the text box won't show up unless we do a buffer swap
|
||||||
GLimp_EndFrame();
|
GLimp_EndFrame();
|
||||||
|
|
|
@ -43,8 +43,9 @@ static menuslider_s s_options_interface_conalpha_slider;
|
||||||
//static menuslider_s s_options_interface_conheight_slider;
|
//static menuslider_s s_options_interface_conheight_slider;
|
||||||
static menuslider_s s_options_interface_menumouse_slider;
|
static menuslider_s s_options_interface_menumouse_slider;
|
||||||
static menuslider_s s_options_interface_menualpha_slider;
|
static menuslider_s s_options_interface_menualpha_slider;
|
||||||
static menulist_s s_options_interface_font_box;
|
static menulist_s s_options_interface_confont_box;
|
||||||
static menuslider_s s_options_interface_fontsize_slider;
|
static menuslider_s s_options_interface_fontsize_slider;
|
||||||
|
static menulist_s s_options_interface_uifont_box;
|
||||||
static menulist_s s_options_interface_alt_text_color_box;
|
static menulist_s s_options_interface_alt_text_color_box;
|
||||||
static menulist_s s_options_interface_simple_loadscreen_box;
|
static menulist_s s_options_interface_simple_loadscreen_box;
|
||||||
static menulist_s s_options_interface_newconback_box;
|
static menulist_s s_options_interface_newconback_box;
|
||||||
|
@ -102,34 +103,49 @@ Font loading
|
||||||
=======================================================================
|
=======================================================================
|
||||||
*/
|
*/
|
||||||
cvar_t *con_font;
|
cvar_t *con_font;
|
||||||
|
cvar_t *ui_font;
|
||||||
#define MAX_FONTS 32
|
#define MAX_FONTS 32
|
||||||
char **font_names = NULL;
|
char **font_names = NULL;
|
||||||
int numfonts = 0;
|
int numfonts = 0;
|
||||||
|
|
||||||
static void FontSizeFunc( void *unused )
|
static void FontSizeFunc (void *unused)
|
||||||
{
|
{
|
||||||
Cvar_SetValue( "con_font_size", s_options_interface_fontsize_slider.curvalue * 2 );
|
Cvar_SetValue( "con_font_size", s_options_interface_fontsize_slider.curvalue * 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FontFunc( void *unused )
|
static void ConFontFunc (void *unused)
|
||||||
{
|
{
|
||||||
Cvar_Set( "con_font", font_names[s_options_interface_font_box.curvalue] );
|
Cvar_Set( "con_font", font_names[s_options_interface_confont_box.curvalue] );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void UIFontFunc (void *unused)
|
||||||
|
{
|
||||||
|
Cvar_Set( "ui_font", font_names[s_options_interface_uifont_box.curvalue] );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetFontCursor (void)
|
void SetFontCursor (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
s_options_interface_font_box.curvalue = 0;
|
|
||||||
|
s_options_interface_confont_box.curvalue = 0;
|
||||||
|
s_options_interface_uifont_box.curvalue = 0;
|
||||||
|
|
||||||
if (!con_font)
|
if (!con_font)
|
||||||
con_font = Cvar_Get ("con_font", "default", CVAR_ARCHIVE);
|
con_font = Cvar_Get ("con_font", "default", CVAR_ARCHIVE);
|
||||||
|
if (!ui_font)
|
||||||
|
ui_font = Cvar_Get ("ui_font", "default", CVAR_ARCHIVE);
|
||||||
|
|
||||||
if (numfonts > 1)
|
if (numfonts > 1)
|
||||||
for (i=0; font_names[i]; i++)
|
for (i=0; font_names[i]; i++)
|
||||||
{
|
{
|
||||||
if (!Q_strcasecmp(con_font->string, font_names[i]))
|
if (!Q_strcasecmp(con_font->string, font_names[i]))
|
||||||
{
|
{
|
||||||
s_options_interface_font_box.curvalue = i;
|
s_options_interface_confont_box.curvalue = i;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!Q_strcasecmp(ui_font->string, font_names[i]))
|
||||||
|
{
|
||||||
|
s_options_interface_uifont_box.curvalue = i;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -287,7 +303,7 @@ char **SetFontNames (void)
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
static void InterfaceSetMenuItemValues( void )
|
static void InterfaceSetMenuItemValues (void)
|
||||||
{
|
{
|
||||||
SetFontCursor();
|
SetFontCursor();
|
||||||
|
|
||||||
|
@ -313,12 +329,13 @@ static void InterfaceSetMenuItemValues( void )
|
||||||
s_options_interface_noalttab_box.curvalue = Cvar_VariableValue("win_noalttab");
|
s_options_interface_noalttab_box.curvalue = Cvar_VariableValue("win_noalttab");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void InterfaceResetDefaultsFunc ( void *unused )
|
static void InterfaceResetDefaultsFunc (void *unused)
|
||||||
{
|
{
|
||||||
Cvar_SetToDefault ("ui_sensitivity");
|
Cvar_SetToDefault ("ui_sensitivity");
|
||||||
Cvar_SetToDefault ("ui_background_alpha");
|
Cvar_SetToDefault ("ui_background_alpha");
|
||||||
Cvar_SetToDefault ("con_font");
|
Cvar_SetToDefault ("con_font");
|
||||||
Cvar_SetToDefault ("con_font_size");
|
Cvar_SetToDefault ("con_font_size");
|
||||||
|
Cvar_SetToDefault ("ui_font");
|
||||||
Cvar_SetToDefault ("alt_text_color");
|
Cvar_SetToDefault ("alt_text_color");
|
||||||
Cvar_SetToDefault ("con_alpha");
|
Cvar_SetToDefault ("con_alpha");
|
||||||
// Cvar_SetToDefault ("con_height");
|
// Cvar_SetToDefault ("con_height");
|
||||||
|
@ -326,10 +343,10 @@ static void InterfaceResetDefaultsFunc ( void *unused )
|
||||||
Cvar_SetToDefault ("con_newconback");
|
Cvar_SetToDefault ("con_newconback");
|
||||||
Cvar_SetToDefault ("win_noalttab");
|
Cvar_SetToDefault ("win_noalttab");
|
||||||
|
|
||||||
InterfaceSetMenuItemValues();
|
InterfaceSetMenuItemValues ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Options_Interface_MenuInit ( void )
|
void Options_Interface_MenuInit (void)
|
||||||
{
|
{
|
||||||
static const char *yesno_names[] =
|
static const char *yesno_names[] =
|
||||||
{
|
{
|
||||||
|
@ -392,14 +409,14 @@ void Options_Interface_MenuInit ( void )
|
||||||
}
|
}
|
||||||
numfonts = 0;
|
numfonts = 0;
|
||||||
font_names = SetFontNames ();
|
font_names = SetFontNames ();
|
||||||
s_options_interface_font_box.generic.type = MTYPE_SPINCONTROL;
|
s_options_interface_confont_box.generic.type = MTYPE_SPINCONTROL;
|
||||||
s_options_interface_font_box.generic.textSize = MENU_FONT_SIZE;
|
s_options_interface_confont_box.generic.textSize = MENU_FONT_SIZE;
|
||||||
s_options_interface_font_box.generic.x = 0;
|
s_options_interface_confont_box.generic.x = 0;
|
||||||
s_options_interface_font_box.generic.y = y+=2*MENU_LINE_SIZE;
|
s_options_interface_confont_box.generic.y = y+=2*MENU_LINE_SIZE;
|
||||||
s_options_interface_font_box.generic.name = "font";
|
s_options_interface_confont_box.generic.name = "console font";
|
||||||
s_options_interface_font_box.generic.callback = FontFunc;
|
s_options_interface_confont_box.generic.callback = ConFontFunc;
|
||||||
s_options_interface_font_box.itemnames = font_names;
|
s_options_interface_confont_box.itemnames = font_names;
|
||||||
s_options_interface_font_box.generic.statusbar = "changes console and menu text font";
|
s_options_interface_confont_box.generic.statusbar = "changes font of console text";
|
||||||
|
|
||||||
s_options_interface_fontsize_slider.generic.type = MTYPE_SLIDER;
|
s_options_interface_fontsize_slider.generic.type = MTYPE_SLIDER;
|
||||||
s_options_interface_fontsize_slider.generic.textSize = MENU_FONT_SIZE;
|
s_options_interface_fontsize_slider.generic.textSize = MENU_FONT_SIZE;
|
||||||
|
@ -411,6 +428,15 @@ void Options_Interface_MenuInit ( void )
|
||||||
s_options_interface_fontsize_slider.maxvalue = 8;
|
s_options_interface_fontsize_slider.maxvalue = 8;
|
||||||
s_options_interface_fontsize_slider.generic.statusbar = "changes size of console text";
|
s_options_interface_fontsize_slider.generic.statusbar = "changes size of console text";
|
||||||
|
|
||||||
|
s_options_interface_uifont_box.generic.type = MTYPE_SPINCONTROL;
|
||||||
|
s_options_interface_uifont_box.generic.textSize = MENU_FONT_SIZE;
|
||||||
|
s_options_interface_uifont_box.generic.x = 0;
|
||||||
|
s_options_interface_uifont_box.generic.y = y+=MENU_LINE_SIZE;
|
||||||
|
s_options_interface_uifont_box.generic.name = "menu font";
|
||||||
|
s_options_interface_uifont_box.generic.callback = UIFontFunc;
|
||||||
|
s_options_interface_uifont_box.itemnames = font_names;
|
||||||
|
s_options_interface_uifont_box.generic.statusbar = "changes font of menu text";
|
||||||
|
|
||||||
s_options_interface_alt_text_color_box.generic.type = MTYPE_SPINCONTROL;
|
s_options_interface_alt_text_color_box.generic.type = MTYPE_SPINCONTROL;
|
||||||
s_options_interface_alt_text_color_box.generic.textSize = MENU_FONT_SIZE;
|
s_options_interface_alt_text_color_box.generic.textSize = MENU_FONT_SIZE;
|
||||||
s_options_interface_alt_text_color_box.generic.x = 0;
|
s_options_interface_alt_text_color_box.generic.x = 0;
|
||||||
|
@ -486,8 +512,9 @@ void Options_Interface_MenuInit ( void )
|
||||||
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_header );
|
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_header );
|
||||||
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_menumouse_slider );
|
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_menumouse_slider );
|
||||||
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_menualpha_slider );
|
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_menualpha_slider );
|
||||||
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_font_box );
|
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_confont_box );
|
||||||
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_fontsize_slider );
|
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_fontsize_slider );
|
||||||
|
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_uifont_box );
|
||||||
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_alt_text_color_box );
|
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_alt_text_color_box );
|
||||||
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_conalpha_slider );
|
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_conalpha_slider );
|
||||||
//Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_conheight_slider );
|
//Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_conheight_slider );
|
||||||
|
@ -497,7 +524,7 @@ void Options_Interface_MenuInit ( void )
|
||||||
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_defaults_action );
|
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_defaults_action );
|
||||||
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_back_action );
|
Menu_AddItem( &s_options_interface_menu, ( void * ) &s_options_interface_back_action );
|
||||||
|
|
||||||
InterfaceSetMenuItemValues();
|
InterfaceSetMenuItemValues ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Options_Interface_MenuDraw (void)
|
void Options_Interface_MenuDraw (void)
|
||||||
|
|
|
@ -128,17 +128,17 @@ static void M_FindKeysForCommand (char *command, int *twokeys)
|
||||||
static void KeysBackCursorDrawFunc (menuaction_s *self) // back action
|
static void KeysBackCursorDrawFunc (menuaction_s *self) // back action
|
||||||
{
|
{
|
||||||
SCR_DrawChar (SCREEN_WIDTH*0.5 - 24, s_keys_menu.y + self->generic.y, MENU_FONT_SIZE, ALIGN_CENTER,
|
SCR_DrawChar (SCREEN_WIDTH*0.5 - 24, s_keys_menu.y + self->generic.y, MENU_FONT_SIZE, ALIGN_CENTER,
|
||||||
12+((int)(Sys_Milliseconds()/250)&1), 255,255,255,255, false, true);
|
12+((int)(Sys_Milliseconds()/250)&1), FONT_UI, 255,255,255,255, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void KeyCursorDrawFunc (menuframework_s *menu)
|
static void KeyCursorDrawFunc (menuframework_s *menu)
|
||||||
{
|
{
|
||||||
if (bind_grab)
|
if (bind_grab)
|
||||||
SCR_DrawChar (menu->x, menu->y + menu->cursor * MENU_LINE_SIZE, MENU_FONT_SIZE, ALIGN_CENTER,
|
SCR_DrawChar (menu->x, menu->y + menu->cursor * MENU_LINE_SIZE, MENU_FONT_SIZE, ALIGN_CENTER,
|
||||||
'=', 255,255,255,255, false, true);
|
'=', FONT_UI, 255,255,255,255, false, true);
|
||||||
else
|
else
|
||||||
SCR_DrawChar (menu->x, menu->y + menu->cursor * MENU_LINE_SIZE, MENU_FONT_SIZE, ALIGN_CENTER,
|
SCR_DrawChar (menu->x, menu->y + menu->cursor * MENU_LINE_SIZE, MENU_FONT_SIZE, ALIGN_CENTER,
|
||||||
12+((int)(Sys_Milliseconds()/250)&1), 255,255,255,255, false, true);
|
12+((int)(Sys_Milliseconds()/250)&1), FONT_UI, 255,255,255,255, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DrawKeyBindingFunc (void *self)
|
static void DrawKeyBindingFunc (void *self)
|
||||||
|
|
|
@ -97,9 +97,9 @@ static void UpdateSoundQualityFunc ( void *unused )
|
||||||
Cvar_SetValue ("s_primary", s_options_sound_compatibility_list.curvalue);
|
Cvar_SetValue ("s_primary", s_options_sound_compatibility_list.curvalue);
|
||||||
|
|
||||||
Menu_DrawTextBox (168, 192, 36, 3);
|
Menu_DrawTextBox (168, 192, 36, 3);
|
||||||
SCR_DrawString (188, 192+MENU_FONT_SIZE, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"Restarting the sound system. This", 255);
|
SCR_DrawString (188, 192+MENU_FONT_SIZE, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"Restarting the sound system. This", FONT_UI, 255);
|
||||||
SCR_DrawString (188, 192+MENU_FONT_SIZE*2, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"could take up to a minute, so", 255);
|
SCR_DrawString (188, 192+MENU_FONT_SIZE*2, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"could take up to a minute, so", FONT_UI, 255);
|
||||||
SCR_DrawString (188, 192+MENU_FONT_SIZE*3, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"please be patient.", 255);
|
SCR_DrawString (188, 192+MENU_FONT_SIZE*3, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"please be patient.", FONT_UI, 255);
|
||||||
|
|
||||||
// the text box won't show up unless we do a buffer swap
|
// the text box won't show up unless we do a buffer swap
|
||||||
GLimp_EndFrame();
|
GLimp_EndFrame();
|
||||||
|
@ -136,9 +136,9 @@ static void SoundResetDefaultsFunc ( void *unused )
|
||||||
Cvar_SetToDefault ("s_primary");
|
Cvar_SetToDefault ("s_primary");
|
||||||
|
|
||||||
Menu_DrawTextBox (168, 192, 36, 3);
|
Menu_DrawTextBox (168, 192, 36, 3);
|
||||||
SCR_DrawString (188, 192+MENU_FONT_SIZE, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"Restarting the sound system. This", 255);
|
SCR_DrawString (188, 192+MENU_FONT_SIZE, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"Restarting the sound system. This", FONT_UI, 255);
|
||||||
SCR_DrawString (188, 192+MENU_FONT_SIZE*2, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"could take up to a minute, so", 255);
|
SCR_DrawString (188, 192+MENU_FONT_SIZE*2, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"could take up to a minute, so", FONT_UI, 255);
|
||||||
SCR_DrawString (188, 192+MENU_FONT_SIZE*3, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"please be patient.", 255);
|
SCR_DrawString (188, 192+MENU_FONT_SIZE*3, MENU_FONT_SIZE, ALIGN_CENTER, S_COLOR_ALT"please be patient.", FONT_UI, 255);
|
||||||
|
|
||||||
// the text box won't show up unless we do a buffer swap
|
// the text box won't show up unless we do a buffer swap
|
||||||
GLimp_EndFrame();
|
GLimp_EndFrame();
|
||||||
|
|
Loading…
Reference in a new issue