- Duke (RR): Fix bad text setup in DrawWeaponBar().

* Fixes #2 of https://forum.zdoom.org/viewtopic.php?f=340&t=70284.
This commit is contained in:
Mitchell Richters 2020-10-22 19:40:39 +11:00
parent d90badef6f
commit e63f5e1ae7

View file

@ -302,10 +302,10 @@ public:
DrawGraphic(tileGetTexture(WEAPONBAR), 0, 158, DI_ITEM_OFFSETS, 1, 0, 0, sbscale, sbscale);
FString format;
for (int i = 0; i < 9; i++)
{
FGameTexture* img = nullptr;
FString format;
if ((g_gameType & GAMEFLAG_RRRA) && i == 4 && p->curr_weapon == CHICKEN_WEAPON)
{
@ -326,7 +326,10 @@ public:
DrawGraphic(img, 18 + i * 32, top - 6.5, DI_ITEM_OFFSETS, 1, 0, 0, sbscale, sbscale);
}
SBar_DrawString(this, &miniFont, format, 38 + i * 32, 162.75 - miniFont.mFont->GetHeight() * scale * 0.5, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale * .875, scale * .875);
if (format.Len())
{
SBar_DrawString(this, &miniFont, format, 38 + i * 32, 162.75 - miniFont.mFont->GetHeight() * scale * 0.5, DI_TEXT_ALIGN_CENTER, CR_UNTRANSLATED, 1, 0, 0, scale * .875, scale * .875);
}
}
}