mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Implement gl_menuscale
This commit is contained in:
parent
61667bd03d
commit
97139029b0
2 changed files with 20 additions and 0 deletions
|
@ -52,6 +52,7 @@ cvar_t *scr_drawall;
|
|||
|
||||
cvar_t *gl_hudscale; /* named for consistency with R1Q2 */
|
||||
cvar_t *gl_consolescale;
|
||||
cvar_t *gl_menuscale;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -433,6 +434,7 @@ SCR_Init(void)
|
|||
scr_drawall = Cvar_Get("scr_drawall", "0", 0);
|
||||
gl_hudscale = Cvar_Get("gl_hudscale", "1", CVAR_ARCHIVE);
|
||||
gl_consolescale = Cvar_Get("gl_consolescale", "1", CVAR_ARCHIVE);
|
||||
gl_menuscale = Cvar_Get("gl_menuscale", "1", CVAR_ARCHIVE);
|
||||
|
||||
/* register our commands */
|
||||
Cmd_AddCommand("timerefresh", SCR_TimeRefresh_f);
|
||||
|
@ -1633,3 +1635,20 @@ SCR_GetConsoleScale(void)
|
|||
|
||||
return scale;
|
||||
}
|
||||
|
||||
float
|
||||
SCR_GetMenuScale(void)
|
||||
{
|
||||
float scale;
|
||||
|
||||
if (gl_menuscale->value < 0)
|
||||
{
|
||||
scale = SCR_GetScale();
|
||||
}
|
||||
else
|
||||
{
|
||||
scale = gl_menuscale->value;
|
||||
}
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
|
|
@ -69,5 +69,6 @@ void SCR_DrawCrosshair(void);
|
|||
|
||||
float SCR_GetHUDScale(void);
|
||||
float SCR_GetConsoleScale(void);
|
||||
float SCR_GetMenuScale(void);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue