mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-19 05:30:49 +00:00
Add con_scale for scaling just the console
This commit is contained in:
parent
d2f8fc63fc
commit
e794e59cd2
8 changed files with 82 additions and 57 deletions
|
@ -165,7 +165,20 @@ CUSTOM_CVAR (Int, con_scaletext, 1, CVAR_ARCHIVE) // Scale notify text at high
|
||||||
if (self > 3) self = 3;
|
if (self > 3) self = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
int con_uiscale()
|
CUSTOM_CVAR(Int, con_scale, 0, CVAR_ARCHIVE)
|
||||||
|
{
|
||||||
|
if (self < 0) self = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int active_con_scale()
|
||||||
|
{
|
||||||
|
if (con_scale == 0)
|
||||||
|
return uiscale;
|
||||||
|
else
|
||||||
|
return con_scale;
|
||||||
|
}
|
||||||
|
|
||||||
|
int active_con_scaletext()
|
||||||
{
|
{
|
||||||
switch (con_scaletext)
|
switch (con_scaletext)
|
||||||
{
|
{
|
||||||
|
@ -505,13 +518,13 @@ void C_AddNotifyString (int printlevel, const char *source)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (con_uiscale() == 0)
|
if (active_con_scaletext() == 0)
|
||||||
{
|
{
|
||||||
width = DisplayWidth / CleanXfac;
|
width = DisplayWidth / CleanXfac;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
width = DisplayWidth / con_uiscale();
|
width = DisplayWidth / active_con_scaletext();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addtype == APPENDLINE && NotifyStrings[NUMNOTIFIES-1].PrintLevel == printlevel)
|
if (addtype == APPENDLINE && NotifyStrings[NUMNOTIFIES-1].PrintLevel == printlevel)
|
||||||
|
@ -733,7 +746,7 @@ static void C_DrawNotifyText ()
|
||||||
canskip = true;
|
canskip = true;
|
||||||
|
|
||||||
lineadv = SmallFont->GetHeight ();
|
lineadv = SmallFont->GetHeight ();
|
||||||
if (con_uiscale() == 0)
|
if (active_con_scaletext() == 0)
|
||||||
{
|
{
|
||||||
lineadv *= CleanYfac;
|
lineadv *= CleanYfac;
|
||||||
}
|
}
|
||||||
|
@ -767,7 +780,7 @@ static void C_DrawNotifyText ()
|
||||||
else
|
else
|
||||||
color = PrintColors[NotifyStrings[i].PrintLevel];
|
color = PrintColors[NotifyStrings[i].PrintLevel];
|
||||||
|
|
||||||
if (con_uiscale() == 0)
|
if (active_con_scaletext() == 0)
|
||||||
{
|
{
|
||||||
if (!center)
|
if (!center)
|
||||||
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
|
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
|
||||||
|
@ -778,7 +791,7 @@ static void C_DrawNotifyText ()
|
||||||
line, NotifyStrings[i].Text, DTA_CleanNoMove, true,
|
line, NotifyStrings[i].Text, DTA_CleanNoMove, true,
|
||||||
DTA_AlphaF, alpha, TAG_DONE);
|
DTA_AlphaF, alpha, TAG_DONE);
|
||||||
}
|
}
|
||||||
else if (con_uiscale() == 1)
|
else if (active_con_scaletext() == 1)
|
||||||
{
|
{
|
||||||
if (!center)
|
if (!center)
|
||||||
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
|
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
|
||||||
|
@ -793,16 +806,16 @@ static void C_DrawNotifyText ()
|
||||||
{
|
{
|
||||||
if (!center)
|
if (!center)
|
||||||
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
|
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
|
||||||
DTA_VirtualWidth, screen->GetWidth() / con_uiscale(),
|
DTA_VirtualWidth, screen->GetWidth() / active_con_scaletext(),
|
||||||
DTA_VirtualHeight, screen->GetHeight() / con_uiscale(),
|
DTA_VirtualHeight, screen->GetHeight() / active_con_scaletext(),
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_AlphaF, alpha, TAG_DONE);
|
DTA_AlphaF, alpha, TAG_DONE);
|
||||||
else
|
else
|
||||||
screen->DrawText (SmallFont, color, (screen->GetWidth() / con_uiscale() -
|
screen->DrawText (SmallFont, color, (screen->GetWidth() / active_con_scaletext() -
|
||||||
SmallFont->StringWidth (NotifyStrings[i].Text))/ con_uiscale(),
|
SmallFont->StringWidth (NotifyStrings[i].Text))/ active_con_scaletext(),
|
||||||
line, NotifyStrings[i].Text,
|
line, NotifyStrings[i].Text,
|
||||||
DTA_VirtualWidth, screen->GetWidth() / con_uiscale(),
|
DTA_VirtualWidth, screen->GetWidth() / active_con_scaletext(),
|
||||||
DTA_VirtualHeight, screen->GetHeight() / con_uiscale(),
|
DTA_VirtualHeight, screen->GetHeight() / active_con_scaletext(),
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_AlphaF, alpha, TAG_DONE);
|
DTA_AlphaF, alpha, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
@ -846,7 +859,7 @@ void C_DrawConsole (bool hw2d)
|
||||||
static int oldbottom = 0;
|
static int oldbottom = 0;
|
||||||
int lines, left, offset;
|
int lines, left, offset;
|
||||||
|
|
||||||
int textScale = con_uiscale();
|
int textScale = active_con_scale();
|
||||||
if (textScale == 0)
|
if (textScale == 0)
|
||||||
textScale = CleanXfac;
|
textScale = CleanXfac;
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ EXTERN_CVAR (Bool, sb_cooperative_enable)
|
||||||
EXTERN_CVAR (Bool, sb_deathmatch_enable)
|
EXTERN_CVAR (Bool, sb_deathmatch_enable)
|
||||||
EXTERN_CVAR (Bool, sb_teamdeathmatch_enable)
|
EXTERN_CVAR (Bool, sb_teamdeathmatch_enable)
|
||||||
|
|
||||||
int con_uiscale();
|
int active_con_scaletext();
|
||||||
|
|
||||||
// Public data
|
// Public data
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ void CT_Drawer (void)
|
||||||
int i, x, scalex, y, promptwidth;
|
int i, x, scalex, y, promptwidth;
|
||||||
|
|
||||||
y = (viewactive || gamestate != GS_LEVEL) ? -10 : -30;
|
y = (viewactive || gamestate != GS_LEVEL) ? -10 : -30;
|
||||||
if (con_uiscale() == 0)
|
if (active_con_scaletext() == 0)
|
||||||
{
|
{
|
||||||
scalex = CleanXfac;
|
scalex = CleanXfac;
|
||||||
y *= CleanYfac;
|
y *= CleanYfac;
|
||||||
|
@ -237,7 +237,7 @@ void CT_Drawer (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
int screen_width, screen_height, st_y;
|
int screen_width, screen_height, st_y;
|
||||||
if (con_uiscale() == 0)
|
if (active_con_scaletext() == 0)
|
||||||
{
|
{
|
||||||
screen_width = SCREENWIDTH;
|
screen_width = SCREENWIDTH;
|
||||||
screen_height = SCREENHEIGHT;
|
screen_height = SCREENHEIGHT;
|
||||||
|
@ -245,9 +245,9 @@ void CT_Drawer (void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen_width = SCREENWIDTH / con_uiscale();
|
screen_width = SCREENWIDTH / active_con_scaletext();
|
||||||
screen_height = SCREENHEIGHT / con_uiscale();
|
screen_height = SCREENHEIGHT / active_con_scaletext();
|
||||||
st_y = ST_Y / con_uiscale();
|
st_y = ST_Y / active_con_scaletext();
|
||||||
}
|
}
|
||||||
|
|
||||||
y += ((SCREENHEIGHT == viewheight && viewactive) || gamestate != GS_LEVEL) ? screen_height : st_y;
|
y += ((SCREENHEIGHT == viewheight && viewactive) || gamestate != GS_LEVEL) ? screen_height : st_y;
|
||||||
|
@ -274,10 +274,10 @@ void CT_Drawer (void)
|
||||||
// draw the prompt, text, and cursor
|
// draw the prompt, text, and cursor
|
||||||
ChatQueue[len] = SmallFont->GetCursor();
|
ChatQueue[len] = SmallFont->GetCursor();
|
||||||
ChatQueue[len+1] = '\0';
|
ChatQueue[len+1] = '\0';
|
||||||
if (con_uiscale() < 2)
|
if (active_con_scaletext() < 2)
|
||||||
{
|
{
|
||||||
screen->DrawText (SmallFont, CR_GREEN, 0, y, prompt, DTA_CleanNoMove, con_uiscale() == 0, TAG_DONE);
|
screen->DrawText (SmallFont, CR_GREEN, 0, y, prompt, DTA_CleanNoMove, active_con_scaletext() == 0, TAG_DONE);
|
||||||
screen->DrawText (SmallFont, CR_GREY, promptwidth, y, (char *)(ChatQueue + i), DTA_CleanNoMove, con_uiscale() == 0, TAG_DONE);
|
screen->DrawText (SmallFont, CR_GREY, promptwidth, y, (char *)(ChatQueue + i), DTA_CleanNoMove, active_con_scaletext() == 0, TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
|
||||||
EXTERN_CVAR(Int, con_scaletext)
|
EXTERN_CVAR(Int, con_scaletext)
|
||||||
int con_uiscale();
|
int active_con_scaletext();
|
||||||
|
|
||||||
IMPLEMENT_POINTY_CLASS (DHUDMessage)
|
IMPLEMENT_POINTY_CLASS (DHUDMessage)
|
||||||
DECLARE_POINTER(Next)
|
DECLARE_POINTER(Next)
|
||||||
|
@ -261,10 +261,10 @@ void DHUDMessage::ResetText (const char *text)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (con_uiscale())
|
switch (active_con_scaletext())
|
||||||
{
|
{
|
||||||
case 0: width = SCREENWIDTH / CleanXfac; break;
|
case 0: width = SCREENWIDTH / CleanXfac; break;
|
||||||
default: width = SCREENWIDTH / con_uiscale(); break;
|
default: width = SCREENWIDTH / active_con_scaletext(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ void DHUDMessage::Draw (int bottom, int visibility)
|
||||||
|
|
||||||
int screen_width = SCREENWIDTH;
|
int screen_width = SCREENWIDTH;
|
||||||
int screen_height = SCREENHEIGHT;
|
int screen_height = SCREENHEIGHT;
|
||||||
if (HUDWidth == 0 && con_uiscale() == 0)
|
if (HUDWidth == 0 && active_con_scaletext() == 0)
|
||||||
{
|
{
|
||||||
clean = true;
|
clean = true;
|
||||||
xscale = CleanXfac;
|
xscale = CleanXfac;
|
||||||
|
@ -341,9 +341,9 @@ void DHUDMessage::Draw (int bottom, int visibility)
|
||||||
xscale = yscale = 1;
|
xscale = yscale = 1;
|
||||||
if (HUDWidth == 0)
|
if (HUDWidth == 0)
|
||||||
{
|
{
|
||||||
screen_width /= con_uiscale();
|
screen_width /= active_con_scaletext();
|
||||||
screen_height /= con_uiscale();
|
screen_height /= active_con_scaletext();
|
||||||
bottom /= con_uiscale();
|
bottom /= active_con_scaletext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,7 +445,7 @@ void DHUDMessage::DoDraw (int linenum, int x, int y, bool clean, int hudheight)
|
||||||
{
|
{
|
||||||
if (hudheight == 0)
|
if (hudheight == 0)
|
||||||
{
|
{
|
||||||
if (con_uiscale() <= 1)
|
if (active_con_scaletext() <= 1)
|
||||||
{
|
{
|
||||||
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_CleanNoMove, clean,
|
DTA_CleanNoMove, clean,
|
||||||
|
@ -456,8 +456,8 @@ void DHUDMessage::DoDraw (int linenum, int x, int y, bool clean, int hudheight)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_VirtualWidth, SCREENWIDTH / con_uiscale(),
|
DTA_VirtualWidth, SCREENWIDTH / active_con_scaletext(),
|
||||||
DTA_VirtualHeight, SCREENHEIGHT / con_uiscale(),
|
DTA_VirtualHeight, SCREENHEIGHT / active_con_scaletext(),
|
||||||
DTA_AlphaF, Alpha,
|
DTA_AlphaF, Alpha,
|
||||||
DTA_RenderStyle, Style,
|
DTA_RenderStyle, Style,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
|
@ -548,7 +548,7 @@ void DHUDMessageFadeOut::DoDraw (int linenum, int x, int y, bool clean, int hudh
|
||||||
float trans = float(Alpha * -(Tics - FadeOutTics) / FadeOutTics);
|
float trans = float(Alpha * -(Tics - FadeOutTics) / FadeOutTics);
|
||||||
if (hudheight == 0)
|
if (hudheight == 0)
|
||||||
{
|
{
|
||||||
if (con_uiscale() <= 1)
|
if (active_con_scaletext() <= 1)
|
||||||
{
|
{
|
||||||
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_CleanNoMove, clean,
|
DTA_CleanNoMove, clean,
|
||||||
|
@ -559,8 +559,8 @@ void DHUDMessageFadeOut::DoDraw (int linenum, int x, int y, bool clean, int hudh
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_VirtualWidth, SCREENWIDTH / con_uiscale(),
|
DTA_VirtualWidth, SCREENWIDTH / active_con_scaletext(),
|
||||||
DTA_VirtualHeight, SCREENHEIGHT / con_uiscale(),
|
DTA_VirtualHeight, SCREENHEIGHT / active_con_scaletext(),
|
||||||
DTA_AlphaF, trans,
|
DTA_AlphaF, trans,
|
||||||
DTA_RenderStyle, Style,
|
DTA_RenderStyle, Style,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
|
@ -648,7 +648,7 @@ void DHUDMessageFadeInOut::DoDraw (int linenum, int x, int y, bool clean, int hu
|
||||||
float trans = float(Alpha * Tics / FadeInTics);
|
float trans = float(Alpha * Tics / FadeInTics);
|
||||||
if (hudheight == 0)
|
if (hudheight == 0)
|
||||||
{
|
{
|
||||||
if (con_uiscale() <= 1)
|
if (active_con_scaletext() <= 1)
|
||||||
{
|
{
|
||||||
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_CleanNoMove, clean,
|
DTA_CleanNoMove, clean,
|
||||||
|
@ -659,8 +659,8 @@ void DHUDMessageFadeInOut::DoDraw (int linenum, int x, int y, bool clean, int hu
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_VirtualWidth, SCREENWIDTH / con_uiscale(),
|
DTA_VirtualWidth, SCREENWIDTH / active_con_scaletext(),
|
||||||
DTA_VirtualHeight, SCREENHEIGHT / con_uiscale(),
|
DTA_VirtualHeight, SCREENHEIGHT / active_con_scaletext(),
|
||||||
DTA_AlphaF, trans,
|
DTA_AlphaF, trans,
|
||||||
DTA_RenderStyle, Style,
|
DTA_RenderStyle, Style,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
|
@ -826,7 +826,7 @@ void DHUDMessageTypeOnFadeOut::DoDraw (int linenum, int x, int y, bool clean, in
|
||||||
{
|
{
|
||||||
if (hudheight == 0)
|
if (hudheight == 0)
|
||||||
{
|
{
|
||||||
if (con_uiscale() <= 1)
|
if (active_con_scaletext() <= 1)
|
||||||
{
|
{
|
||||||
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_CleanNoMove, clean,
|
DTA_CleanNoMove, clean,
|
||||||
|
@ -838,8 +838,8 @@ void DHUDMessageTypeOnFadeOut::DoDraw (int linenum, int x, int y, bool clean, in
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
|
||||||
DTA_VirtualWidth, SCREENWIDTH / con_uiscale(),
|
DTA_VirtualWidth, SCREENWIDTH / active_con_scaletext(),
|
||||||
DTA_VirtualHeight, SCREENHEIGHT / con_uiscale(),
|
DTA_VirtualHeight, SCREENHEIGHT / active_con_scaletext(),
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_TextLen, LineVisible,
|
DTA_TextLen, LineVisible,
|
||||||
DTA_AlphaF, Alpha,
|
DTA_AlphaF, Alpha,
|
||||||
|
|
|
@ -118,7 +118,7 @@ static int hudwidth, hudheight; // current width/height for HUD display
|
||||||
static int statspace;
|
static int statspace;
|
||||||
|
|
||||||
DVector2 AM_GetPosition();
|
DVector2 AM_GetPosition();
|
||||||
int con_uiscale();
|
int active_con_scaletext();
|
||||||
|
|
||||||
FTextureID GetHUDIcon(PClassInventory *cls)
|
FTextureID GetHUDIcon(PClassInventory *cls)
|
||||||
{
|
{
|
||||||
|
@ -886,15 +886,15 @@ static void DrawCoordinates(player_t * CPlayer)
|
||||||
}
|
}
|
||||||
|
|
||||||
int vwidth, vheight;
|
int vwidth, vheight;
|
||||||
if (con_uiscale() == 0)
|
if (active_con_scaletext() == 0)
|
||||||
{
|
{
|
||||||
vwidth = SCREENWIDTH / 2;
|
vwidth = SCREENWIDTH / 2;
|
||||||
vheight = SCREENHEIGHT / 2;
|
vheight = SCREENHEIGHT / 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vwidth = SCREENWIDTH / con_uiscale();
|
vwidth = SCREENWIDTH / active_con_scaletext();
|
||||||
vheight = SCREENHEIGHT / con_uiscale();
|
vheight = SCREENHEIGHT / active_con_scaletext();
|
||||||
}
|
}
|
||||||
|
|
||||||
int xpos = vwidth - SmallFont->StringWidth("X: -00000")-6;
|
int xpos = vwidth - SmallFont->StringWidth("X: -00000")-6;
|
||||||
|
|
|
@ -74,7 +74,7 @@ EXTERN_CVAR (Bool, am_showtotaltime)
|
||||||
EXTERN_CVAR (Bool, noisedebug)
|
EXTERN_CVAR (Bool, noisedebug)
|
||||||
EXTERN_CVAR (Int, con_scaletext)
|
EXTERN_CVAR (Int, con_scaletext)
|
||||||
|
|
||||||
int con_uiscale();
|
int active_con_scaletext();
|
||||||
|
|
||||||
DBaseStatusBar *StatusBar;
|
DBaseStatusBar *StatusBar;
|
||||||
|
|
||||||
|
@ -1242,17 +1242,17 @@ void DBaseStatusBar::Draw (EHudState state)
|
||||||
int xpos;
|
int xpos;
|
||||||
int y;
|
int y;
|
||||||
|
|
||||||
if (con_uiscale() == 1)
|
if (active_con_scaletext() == 1)
|
||||||
{
|
{
|
||||||
vwidth = SCREENWIDTH;
|
vwidth = SCREENWIDTH;
|
||||||
vheight = SCREENHEIGHT;
|
vheight = SCREENHEIGHT;
|
||||||
xpos = vwidth - 80;
|
xpos = vwidth - 80;
|
||||||
y = ::ST_Y - height;
|
y = ::ST_Y - height;
|
||||||
}
|
}
|
||||||
else if (con_uiscale() > 1)
|
else if (active_con_scaletext() > 1)
|
||||||
{
|
{
|
||||||
vwidth = SCREENWIDTH / con_uiscale();
|
vwidth = SCREENWIDTH / active_con_scaletext();
|
||||||
vheight = SCREENHEIGHT / con_uiscale();
|
vheight = SCREENHEIGHT / active_con_scaletext();
|
||||||
xpos = vwidth - SmallFont->StringWidth("X: -00000")-6;
|
xpos = vwidth - SmallFont->StringWidth("X: -00000")-6;
|
||||||
y = ::ST_Y/4 - height;
|
y = ::ST_Y/4 - height;
|
||||||
}
|
}
|
||||||
|
@ -1266,9 +1266,9 @@ void DBaseStatusBar::Draw (EHudState state)
|
||||||
|
|
||||||
if (gameinfo.gametype == GAME_Strife)
|
if (gameinfo.gametype == GAME_Strife)
|
||||||
{
|
{
|
||||||
if (con_uiscale() == 1)
|
if (active_con_scaletext() == 1)
|
||||||
y -= height * 4;
|
y -= height * 4;
|
||||||
else if (con_uiscale() > 3)
|
else if (active_con_scaletext() > 3)
|
||||||
y -= height;
|
y -= height;
|
||||||
else
|
else
|
||||||
y -= height * 2;
|
y -= height * 2;
|
||||||
|
@ -1402,15 +1402,15 @@ void DBaseStatusBar::DrawLog ()
|
||||||
if (CPlayer->LogText.IsNotEmpty())
|
if (CPlayer->LogText.IsNotEmpty())
|
||||||
{
|
{
|
||||||
// This uses the same scaling as regular HUD messages
|
// This uses the same scaling as regular HUD messages
|
||||||
if (con_uiscale() == 0)
|
if (active_con_scaletext() == 0)
|
||||||
{
|
{
|
||||||
hudwidth = SCREENWIDTH / CleanXfac;
|
hudwidth = SCREENWIDTH / CleanXfac;
|
||||||
hudheight = SCREENHEIGHT / CleanYfac;
|
hudheight = SCREENHEIGHT / CleanYfac;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hudwidth = SCREENWIDTH / con_uiscale();
|
hudwidth = SCREENWIDTH / active_con_scaletext();
|
||||||
hudheight = SCREENHEIGHT / con_uiscale();
|
hudheight = SCREENHEIGHT / active_con_scaletext();
|
||||||
}
|
}
|
||||||
|
|
||||||
int linelen = hudwidth<640? Scale(hudwidth,9,10)-40 : 560;
|
int linelen = hudwidth<640? Scale(hudwidth,9,10)-40 : 560;
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
#include "menu/menu.h"
|
#include "menu/menu.h"
|
||||||
#include "r_data/voxels.h"
|
#include "r_data/voxels.h"
|
||||||
|
|
||||||
int con_uiscale();
|
int active_con_scale();
|
||||||
|
|
||||||
FRenderer *Renderer;
|
FRenderer *Renderer;
|
||||||
|
|
||||||
|
@ -858,7 +858,7 @@ void DFrameBuffer::DrawRateStuff ()
|
||||||
int chars;
|
int chars;
|
||||||
int rate_x;
|
int rate_x;
|
||||||
|
|
||||||
int textScale = con_uiscale();
|
int textScale = active_con_scale();
|
||||||
if (textScale == 0)
|
if (textScale == 0)
|
||||||
textScale = CleanXfac;
|
textScale = CleanXfac;
|
||||||
|
|
||||||
|
|
|
@ -1947,6 +1947,7 @@ MSGMNU_SHOWMESSAGES = "Show messages";
|
||||||
MSGMNU_SHOWOBITUARIES = "Show obituaries";
|
MSGMNU_SHOWOBITUARIES = "Show obituaries";
|
||||||
MSGMNU_SHOWSECRETS = "Show secret notifications";
|
MSGMNU_SHOWSECRETS = "Show secret notifications";
|
||||||
MSGMNU_SCALETEXT = "Scale text in high res";
|
MSGMNU_SCALETEXT = "Scale text in high res";
|
||||||
|
MSGMNU_SCALECONSOLE = "Scale console";
|
||||||
MSGMNU_MESSAGELEVEL = "Minimum message level";
|
MSGMNU_MESSAGELEVEL = "Minimum message level";
|
||||||
MSGMNU_CENTERMESSAGES = "Center messages";
|
MSGMNU_CENTERMESSAGES = "Center messages";
|
||||||
MSGMNU_MESSAGECOLORS = "Message Colors";
|
MSGMNU_MESSAGECOLORS = "Message Colors";
|
||||||
|
@ -2238,6 +2239,7 @@ OPTVAL_ANIMATED = "Animated";
|
||||||
OPTVAL_ROTATED = "Rotated";
|
OPTVAL_ROTATED = "Rotated";
|
||||||
OPTVAL_MAPDEFINEDCOLORSONLY = "Map defined colors only";
|
OPTVAL_MAPDEFINEDCOLORSONLY = "Map defined colors only";
|
||||||
OPTVAL_DOUBLE = "Double";
|
OPTVAL_DOUBLE = "Double";
|
||||||
|
OPTVAL_TRIPLE = "Triple";
|
||||||
OPTVAL_QUADRUPLE = "Quadruple";
|
OPTVAL_QUADRUPLE = "Quadruple";
|
||||||
OPTVAL_ITEMPICKUP = "Item Pickup";
|
OPTVAL_ITEMPICKUP = "Item Pickup";
|
||||||
OPTVAL_OBITUARIES = "Obituaries";
|
OPTVAL_OBITUARIES = "Obituaries";
|
||||||
|
|
|
@ -1114,6 +1114,15 @@ OptionValue ScaleValues
|
||||||
3, "$OPTVAL_QUADRUPLE"
|
3, "$OPTVAL_QUADRUPLE"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OptionValue ConsoleScaleValues
|
||||||
|
{
|
||||||
|
1, "$OPTVAL_OFF"
|
||||||
|
0, "$OPTVAL_ON"
|
||||||
|
2, "$OPTVAL_DOUBLE"
|
||||||
|
3, "$OPTVAL_TRIPLE"
|
||||||
|
4, "$OPTVAL_QUADRUPLE"
|
||||||
|
}
|
||||||
|
|
||||||
OptionValue MessageLevels
|
OptionValue MessageLevels
|
||||||
{
|
{
|
||||||
0.0, "$OPTVAL_ITEMPICKUP"
|
0.0, "$OPTVAL_ITEMPICKUP"
|
||||||
|
@ -1137,6 +1146,7 @@ OptionMenu MessageOptions
|
||||||
Option "$MSGMNU_SHOWOBITUARIES", "show_obituaries", "OnOff"
|
Option "$MSGMNU_SHOWOBITUARIES", "show_obituaries", "OnOff"
|
||||||
Option "$MSGMNU_SHOWSECRETS", "cl_showsecretmessage", "OnOff"
|
Option "$MSGMNU_SHOWSECRETS", "cl_showsecretmessage", "OnOff"
|
||||||
Option "$MSGMNU_SCALETEXT", "con_scaletext", "ScaleValues"
|
Option "$MSGMNU_SCALETEXT", "con_scaletext", "ScaleValues"
|
||||||
|
Option "$MSGMNU_SCALECONSOLE", "con_scale", "ConsoleScaleValues"
|
||||||
Option "$MSGMNU_MESSAGELEVEL", "msg", "MessageLevels"
|
Option "$MSGMNU_MESSAGELEVEL", "msg", "MessageLevels"
|
||||||
Option "$MSGMNU_DEVELOPER", "developer", "DevMessageLevels"
|
Option "$MSGMNU_DEVELOPER", "developer", "DevMessageLevels"
|
||||||
Option "$MSGMNU_CENTERMESSAGES", "con_centernotify", "OnOff"
|
Option "$MSGMNU_CENTERMESSAGES", "con_centernotify", "OnOff"
|
||||||
|
|
Loading…
Reference in a new issue