Vote screen uses the font's intended character spacing

This commit is contained in:
TehRealSalt 2018-09-02 22:53:40 -04:00
parent 70b9f49c94
commit 3b5f251ff0
2 changed files with 11 additions and 7 deletions

View file

@ -1755,8 +1755,9 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
case V_OLDSPACING:
charwidth = 5;
break;
case V_6WIDTHSPACE:
spacewidth = 3;
// Out of video flags, so we're reusing this for alternate charwidth instead
/*case V_6WIDTHSPACE:
spacewidth = 3;*/
default:
break;
}
@ -1798,7 +1799,8 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
if (charwidth)
w = charwidth * dupx;
else
w = (SHORT(tny_font[c]->width) * dupx);
w = ((option & V_6WIDTHSPACE ? max(1, SHORT(tny_font[c]->width)-1) // Reuse this flag for the alternate bunched-up spacing
: SHORT(tny_font[c]->width)) * dupx);
if (cx > scrwidth)
break;
@ -2220,8 +2222,9 @@ INT32 V_ThinStringWidth(const char *string, INT32 option)
case V_OLDSPACING:
charwidth = 5;
break;
case V_6WIDTHSPACE:
spacewidth = 3;
// Out of video flags, so we're reusing this for alternate charwidth instead
/*case V_6WIDTHSPACE:
spacewidth = 3;*/
default:
break;
}
@ -2236,7 +2239,8 @@ INT32 V_ThinStringWidth(const char *string, INT32 option)
if (c < 0 || c >= HU_FONTSIZE || !tny_font[c])
w += spacewidth;
else
w += (charwidth ? charwidth : SHORT(tny_font[c]->width));
w += (charwidth ? charwidth
: (option & V_6WIDTHSPACE ? max(1, SHORT(tny_font[c]->width)-1) : SHORT(tny_font[c]->width))); // Reuse this flag for the alternate bunched-up spacing
}
return w;

View file

@ -1048,7 +1048,7 @@ void Y_VoteDrawer(void)
}
V_DrawSmallScaledPatch(BASEVIDWIDTH-100, y, V_SNAPTORIGHT, pic);
V_DrawRightAlignedThinString(BASEVIDWIDTH-20, 40+y, V_SNAPTORIGHT, str);
V_DrawRightAlignedThinString(BASEVIDWIDTH-22, 40+y, V_SNAPTORIGHT|V_6WIDTHSPACE, str);
if (levelinfo[i].gts)
{
INT32 w = V_ThinStringWidth(levelinfo[i].gts, V_SNAPTORIGHT)+1;