mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- HUD scaling for automap HUD.
This commit is contained in:
parent
efaaa3c118
commit
24a275804c
1 changed files with 5 additions and 6 deletions
|
@ -86,7 +86,6 @@ EXTERN_CVAR (Bool, am_showitems)
|
||||||
EXTERN_CVAR (Bool, am_showtime)
|
EXTERN_CVAR (Bool, am_showtime)
|
||||||
EXTERN_CVAR (Bool, am_showtotaltime)
|
EXTERN_CVAR (Bool, am_showtotaltime)
|
||||||
EXTERN_CVAR (Bool, noisedebug)
|
EXTERN_CVAR (Bool, noisedebug)
|
||||||
EXTERN_CVAR(Bool, vid_fps)
|
|
||||||
EXTERN_CVAR(Bool, inter_subtitles)
|
EXTERN_CVAR(Bool, inter_subtitles)
|
||||||
EXTERN_CVAR(Bool, ui_screenborder_classic_scaling)
|
EXTERN_CVAR(Bool, ui_screenborder_classic_scaling)
|
||||||
|
|
||||||
|
@ -548,11 +547,12 @@ void FormatMapName(FLevelLocals *self, int cr, FString *result);
|
||||||
|
|
||||||
void DBaseStatusBar::DoDrawAutomapHUD(int crdefault, int highlight)
|
void DBaseStatusBar::DoDrawAutomapHUD(int crdefault, int highlight)
|
||||||
{
|
{
|
||||||
auto scale = GetUIScale(twod, hud_scale);
|
auto scalev = GetHUDScale();
|
||||||
|
int vwidth = int(twod->GetWidth() / scalev.X);
|
||||||
|
int vheight = int(twod->GetHeight() / scalev.Y);
|
||||||
|
|
||||||
auto font = generic_ui ? NewSmallFont : SmallFont;
|
auto font = generic_ui ? NewSmallFont : SmallFont;
|
||||||
auto font2 = font;
|
auto font2 = font;
|
||||||
auto vwidth = twod->GetWidth() / scale;
|
|
||||||
auto vheight = twod->GetHeight() / scale;
|
|
||||||
auto fheight = font->GetHeight();
|
auto fheight = font->GetHeight();
|
||||||
FString textbuffer;
|
FString textbuffer;
|
||||||
int sec;
|
int sec;
|
||||||
|
@ -568,7 +568,6 @@ void DBaseStatusBar::DoDrawAutomapHUD(int crdefault, int highlight)
|
||||||
|
|
||||||
if (am_showtime)
|
if (am_showtime)
|
||||||
{
|
{
|
||||||
if (vid_fps) y += (NewConsoleFont->GetHeight() * active_con_scale(twod) + 5) / scale;
|
|
||||||
sec = Tics2Seconds(primaryLevel->time);
|
sec = Tics2Seconds(primaryLevel->time);
|
||||||
textbuffer.Format("%02d:%02d:%02d", sec / 3600, (sec % 3600) / 60, sec % 60);
|
textbuffer.Format("%02d:%02d:%02d", sec / 3600, (sec % 3600) / 60, sec % 60);
|
||||||
DrawText(twod, font, crdefault, vwidth - zerowidth * 8 - textdist, y, textbuffer, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight,
|
DrawText(twod, font, crdefault, vwidth - zerowidth * 8 - textdist, y, textbuffer, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight,
|
||||||
|
@ -630,7 +629,7 @@ void DBaseStatusBar::DoDrawAutomapHUD(int crdefault, int highlight)
|
||||||
IFVIRTUAL(DStatusBarCore, GetProtrusion)
|
IFVIRTUAL(DStatusBarCore, GetProtrusion)
|
||||||
{
|
{
|
||||||
int prot = 0;
|
int prot = 0;
|
||||||
VMValue params[] = { this, double(finalwidth * scale / w) };
|
VMValue params[] = { this, double(finalwidth * scalev.X / w) };
|
||||||
VMReturn ret(&prot);
|
VMReturn ret(&prot);
|
||||||
VMCall(func, params, 2, &ret, 1);
|
VMCall(func, params, 2, &ret, 1);
|
||||||
h = prot;
|
h = prot;
|
||||||
|
|
Loading…
Reference in a new issue