From 5973391a5148d040c6aea9849d6290afce030cf7 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 11 Oct 2020 22:38:51 +1100 Subject: [PATCH] - SW: Tune `DrawHUD2()` text positioning and image scaling. Not sure how or when these came to be off. Perhaps additional chars have effected the overall font size? --- source/sw/src/sbar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/sw/src/sbar.cpp b/source/sw/src/sbar.cpp index c2877db16..df3b0efbd 100644 --- a/source/sw/src/sbar.cpp +++ b/source/sw/src/sbar.cpp @@ -787,7 +787,7 @@ private: FString format; FGameTexture* img; double imgScale; - double baseScale = numberFont.mFont->GetHeight() * 0.9375; + double baseScale = numberFont.mFont->GetHeight() * 0.83125; // // Health @@ -804,7 +804,7 @@ private: int intens = clamp(255 - 4 * s, 0, 255); auto pe = PalEntry(255, intens, intens, intens); format.Format("%d", u->Health); - SBar_DrawString(this, &numberFont, format, 24.25, -numberFont.mFont->GetHeight(), DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, 1, 0, 0, 1, 1); + SBar_DrawString(this, &numberFont, format, 24.25, -numberFont.mFont->GetHeight() + 2, DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, 1, 0, 0, 1, 1); } // @@ -815,7 +815,7 @@ private: DrawGraphic(img, 80.75, -1, DI_ITEM_LEFT_BOTTOM, 1., -1, -1, imgScale, imgScale); format.Format("%d", pp->Armor); - SBar_DrawString(this, &numberFont, format, 108.5, -numberFont.mFont->GetHeight(), DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, 1, 0, 0, 1, 1); + SBar_DrawString(this, &numberFont, format, 108.5, -numberFont.mFont->GetHeight() + 2, DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, 1, 0, 0, 1, 1); // // Weapon @@ -860,7 +860,7 @@ private: if ((!althud_flashing || PlayClock & 32 || ammo > (DamageData[weapon].max_ammo / 10))) { - SBar_DrawString(this, &numberFont, format, -1.5, -numberFont.mFont->GetHeight(), DI_TEXT_ALIGN_RIGHT, CR_UNTRANSLATED, 1, 0, 0, 1, 1); + SBar_DrawString(this, &numberFont, format, -1.5, -numberFont.mFont->GetHeight() + 2, DI_TEXT_ALIGN_RIGHT, CR_UNTRANSLATED, 1, 0, 0, 1, 1); } DrawGraphic(img, -imgX, -1, DI_ITEM_RIGHT_BOTTOM, 1, -1, -1, imgScale, imgScale);