Hide console scaling behin gl_consolescale
With this change it's possible to scale the HUD but not the console. And vice versa.
This commit is contained in:
parent
074891a8a2
commit
869ce24922
9
README
9
README
|
@ -530,8 +530,13 @@ the most common questions are answered.
|
||||||
followd by a vid_restart. Please note that very old graphic cards may not
|
followd by a vid_restart. Please note that very old graphic cards may not
|
||||||
support antialiasing at all.
|
support antialiasing at all.
|
||||||
|
|
||||||
- If you want to scale the HUD (e.g. for high resoltutions), set the
|
- If you want to scale the HUD (e.g. for high resolutions), set the
|
||||||
gl_hudscale cvar to a value > 1 (2.0 works well).
|
gl_hudscale cvar to -1. To specify the scale factor by hand, set the
|
||||||
|
cvar to a value > 0.
|
||||||
|
|
||||||
|
- If you want to scale the console (e.g. for high resolutions), set the
|
||||||
|
gl_consolescale cvar to -1. To specify the scale factor by hand, set the
|
||||||
|
cvar to a value > 0.
|
||||||
|
|
||||||
5.2 Input
|
5.2 Input
|
||||||
---------
|
---------
|
||||||
|
|
|
@ -487,7 +487,7 @@ Con_DrawInput(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
scale = SCR_GetHUDScale();
|
scale = SCR_GetConsoleScale();
|
||||||
text = key_lines[edit_line];
|
text = key_lines[edit_line];
|
||||||
|
|
||||||
/* add the cursor frame */
|
/* add the cursor frame */
|
||||||
|
@ -529,7 +529,7 @@ Con_DrawNotify(void)
|
||||||
float scale;
|
float scale;
|
||||||
|
|
||||||
v = 0;
|
v = 0;
|
||||||
scale = SCR_GetHUDScale();
|
scale = SCR_GetConsoleScale();
|
||||||
|
|
||||||
for (i = con.current - NUM_CON_TIMES + 1; i <= con.current; i++)
|
for (i = con.current - NUM_CON_TIMES + 1; i <= con.current; i++)
|
||||||
{
|
{
|
||||||
|
@ -621,7 +621,7 @@ Con_DrawConsole(float frac)
|
||||||
time_t t;
|
time_t t;
|
||||||
struct tm *today;
|
struct tm *today;
|
||||||
|
|
||||||
scale = SCR_GetHUDScale();
|
scale = SCR_GetConsoleScale();
|
||||||
lines = viddef.height * frac;
|
lines = viddef.height * frac;
|
||||||
|
|
||||||
if (lines <= 0)
|
if (lines <= 0)
|
||||||
|
|
|
@ -51,6 +51,7 @@ cvar_t *scr_graphshift;
|
||||||
cvar_t *scr_drawall;
|
cvar_t *scr_drawall;
|
||||||
|
|
||||||
cvar_t *gl_hudscale; /* named for consistency with R1Q2 */
|
cvar_t *gl_hudscale; /* named for consistency with R1Q2 */
|
||||||
|
cvar_t *gl_consolescale;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -257,7 +258,7 @@ SCR_DrawCenterString(void)
|
||||||
|
|
||||||
scr_erase_center = 0;
|
scr_erase_center = 0;
|
||||||
start = scr_centerstring;
|
start = scr_centerstring;
|
||||||
scale = SCR_GetHUDScale();
|
scale = SCR_GetConsoleScale();
|
||||||
|
|
||||||
if (scr_center_lines <= 4)
|
if (scr_center_lines <= 4)
|
||||||
{
|
{
|
||||||
|
@ -431,6 +432,7 @@ SCR_Init(void)
|
||||||
scr_graphshift = Cvar_Get("graphshift", "0", 0);
|
scr_graphshift = Cvar_Get("graphshift", "0", 0);
|
||||||
scr_drawall = Cvar_Get("scr_drawall", "0", 0);
|
scr_drawall = Cvar_Get("scr_drawall", "0", 0);
|
||||||
gl_hudscale = Cvar_Get("gl_hudscale", "1", CVAR_ARCHIVE);
|
gl_hudscale = Cvar_Get("gl_hudscale", "1", CVAR_ARCHIVE);
|
||||||
|
gl_consolescale = Cvar_Get("gl_consolescale", "1", CVAR_ARCHIVE);
|
||||||
|
|
||||||
/* register our commands */
|
/* register our commands */
|
||||||
Cmd_AddCommand("timerefresh", SCR_TimeRefresh_f);
|
Cmd_AddCommand("timerefresh", SCR_TimeRefresh_f);
|
||||||
|
@ -1581,7 +1583,7 @@ SCR_DrawCrosshair(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
SCR_GetHUDScale(void)
|
SCR_GetScale(void)
|
||||||
{
|
{
|
||||||
float scale;
|
float scale;
|
||||||
|
|
||||||
|
@ -1609,3 +1611,36 @@ SCR_GetHUDScale(void)
|
||||||
return scale;
|
return scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
SCR_GetHUDScale(void)
|
||||||
|
{
|
||||||
|
float scale;
|
||||||
|
|
||||||
|
if (gl_hudscale->value < 0)
|
||||||
|
{
|
||||||
|
scale = SCR_GetScale();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
scale = gl_hudscale->value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return scale;
|
||||||
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
SCR_GetConsoleScale(void)
|
||||||
|
{
|
||||||
|
float scale;
|
||||||
|
|
||||||
|
if (gl_consolescale->value < 0)
|
||||||
|
{
|
||||||
|
scale = SCR_GetScale();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
scale = gl_consolescale->value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return scale;
|
||||||
|
}
|
||||||
|
|
|
@ -68,5 +68,6 @@ void SCR_FinishCinematic(void);
|
||||||
void SCR_DrawCrosshair(void);
|
void SCR_DrawCrosshair(void);
|
||||||
|
|
||||||
float SCR_GetHUDScale(void);
|
float SCR_GetHUDScale(void);
|
||||||
|
float SCR_GetConsoleScale(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue