From 74f52110463d96bdbde689fe7678a833a907c3cc Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 20 Feb 2019 18:54:29 +0100 Subject: [PATCH] - fixed accidental commit of incomplete test code. --- wadsrc/static/zscript/menu/listmenuitems.txt | 6 +++--- wadsrc/static/zscript/statscreen/statscreen.txt | 3 ++- wadsrc/static/zscript/statscreen/statscreen_sp.txt | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/wadsrc/static/zscript/menu/listmenuitems.txt b/wadsrc/static/zscript/menu/listmenuitems.txt index 28a0a7b47..b1c8e6992 100644 --- a/wadsrc/static/zscript/menu/listmenuitems.txt +++ b/wadsrc/static/zscript/menu/listmenuitems.txt @@ -71,7 +71,7 @@ class ListMenuItemStaticPatch : ListMenuItem Font mFont; int mColor; - void Init(ListMenuDescriptor desc, double x, double y, TextureID patch, bool centered = false, const char *substitute = "") + void Init(ListMenuDescriptor desc, double x, double y, TextureID patch, bool centered = false, String substitute = "") { Super.Init(x, y); mTexture = patch; @@ -123,9 +123,9 @@ class ListMenuItemStaticPatch : ListMenuItem class ListMenuItemStaticPatchCentered : ListMenuItemStaticPatch { - void Init(double x, double y, TextureID patch) + void Init(ListMenuDescriptor desc, double x, double y, TextureID patch) { - Super.Init(x, y, patch, true); + Super.Init(desc, x, y, patch, true); } } diff --git a/wadsrc/static/zscript/statscreen/statscreen.txt b/wadsrc/static/zscript/statscreen/statscreen.txt index 1fb36558c..4a4d69e64 100644 --- a/wadsrc/static/zscript/statscreen/statscreen.txt +++ b/wadsrc/static/zscript/statscreen/statscreen.txt @@ -194,7 +194,8 @@ class StatusScreen abstract play version("2.5") if (pinfo.mPatch.isValid()) { - screen.DrawTexture(pinfo.mPatch, true, midx, y, DTA_CleanNoMove, true, DTA_CenterXOffset, true); + Vector2 size = TexMan.GetScaledSize(pinfo.mPatch); + screen.DrawTexture(pinfo.mPatch, true, midx - size.X, y, DTA_CleanNoMove, true); return y + int(size.Y * CleanYfac); } else diff --git a/wadsrc/static/zscript/statscreen/statscreen_sp.txt b/wadsrc/static/zscript/statscreen/statscreen_sp.txt index 56846b8ed..eb469e285 100644 --- a/wadsrc/static/zscript/statscreen/statscreen_sp.txt +++ b/wadsrc/static/zscript/statscreen/statscreen_sp.txt @@ -142,8 +142,8 @@ class DoomStatusScreen : StatusScreen let tcolor = Font.CR_RED; // For visual consistency, only use the patches here if all are present. - bool useGfx = Kills.OkForLocalization() && Items.OkForLocalization() && P_secret.OkForLocalization() && Timepic.OkForLocalization() && - (!wbs.partime || Par.OkForLocalization()); + bool useGfx = TexMan.OkForLocalization(Kills) && TexMan.OkForLocalization(Items) && TexMan.OkForLocalization(P_secret) && TexMan.OkForLocalization(Timepic) && + (!wbs.partime || TexMan.OkForLocalization(Par)); Font printFont; @@ -178,7 +178,7 @@ class DoomStatusScreen : StatusScreen { // "sucks" int x = 160 - SP_TIMEX; int y = SP_TIMEY; - if (useGfx && Sucks.OkForLocalization()) + if (useGfx && TexMan.OkForLocalization(Sucks)) { let size = TexMan.GetScaledSize(Sucks); screen.DrawTexture (Sucks, true, x - size.X, y - size.Y - 2, DTA_Clean, true); @@ -191,7 +191,7 @@ class DoomStatusScreen : StatusScreen if (wi_showtotaltime) { - drawTimeFont (printFont, 160 - SP_TIMEX, SP_TIMEY + lh, cnt_total_time, true); // no 'sucks' for total time ever! + drawTimeFont (printFont, 160 - SP_TIMEX, SP_TIMEY + lh, cnt_total_time); } drawTimeFont (printFont, 320 - SP_TIMEX, SP_TIMEY, cnt_par); }