From 25d516c36f14ff0fa55a9fe766aedcc3dc561e32 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 16 May 2021 16:12:44 +0200 Subject: [PATCH] - fixed shadow and positioning of stats display. --- wadsrc/static/zscript/games/duke/ui/sbar_d.zs | 2 +- wadsrc/static/zscript/statusbar.zs | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/wadsrc/static/zscript/games/duke/ui/sbar_d.zs b/wadsrc/static/zscript/games/duke/ui/sbar_d.zs index 5cb3bc9ee..2ddf844ac 100644 --- a/wadsrc/static/zscript/games/duke/ui/sbar_d.zs +++ b/wadsrc/static/zscript/games/duke/ui/sbar_d.zs @@ -298,7 +298,7 @@ class DukeStatusBar : DukeCommonStatusBar { DrawInventory(p, 0, -46, DI_SCREEN_CENTER_BOTTOM); FullscreenHUD1(p); - DoLevelStats(tileHeight("BIGALPHANUM") +10, info); + DoLevelStats(fontheight[hw_hightile ? 1 : 0] + 6, info); } else if (style == 2) { diff --git a/wadsrc/static/zscript/statusbar.zs b/wadsrc/static/zscript/statusbar.zs index 9f8a50878..c6936d465 100644 --- a/wadsrc/static/zscript/statusbar.zs +++ b/wadsrc/static/zscript/statusbar.zs @@ -29,7 +29,7 @@ class RazeStatusBar : StatusBarCore void drawStatText(Font statFont, double x, double y, String text, double scale) { Screen.DrawText(statfont, Font.CR_UNTRANSLATED, x + scale, y + scale, text, DTA_FullscreenScale, FSMode_ScaleToHeight, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, - DTA_KeepRatio, true, DTA_ScaleX, scale, DTA_ScaleY, scale, DTA_LegacyRenderStyle, STYLE_TranslucentStencil, DTA_Color, 0); + DTA_KeepRatio, true, DTA_ScaleX, scale, DTA_ScaleY, scale, DTA_LegacyRenderStyle, STYLE_TranslucentStencil, DTA_Color, 0x80000000); Screen.DrawText(statfont, Font.CR_UNTRANSLATED, x, y, text, DTA_FullscreenScale, FSMode_ScaleToHeight, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_KeepRatio, true, DTA_ScaleX, scale, DTA_ScaleY, scale); } @@ -49,7 +49,11 @@ class RazeStatusBar : StatusBarCore double scale = info.fontscale * hud_statscale; if (info.spacing <= 0) info.spacing = info.statfont.GetHeight() * info.fontscale; double spacing = info.spacing * hud_statscale; - if (info.screenbottomspace < 0) + if (hud_size == Hud_Nothing) + { + y = 198 - spacing; + } + else if (info.screenbottomspace < 0) { y = 200 - (RelTop - info.screenbottomspace) * hud_scalefactor - spacing; }