Skip to content
Permalink
Browse files

- handle generic fonts on the summary screen.

  • Loading branch information...
coelckers committed Apr 11, 2019
1 parent 6a3bc71 commit 9f5b0001fe43096a7c4fc71a15f1f911e58f6704
@@ -64,9 +64,9 @@ gameinfo
textscreeny = 10
defaultendsequence = "Inter_Pic1"
maparrow = "maparrows/arrow.txt", "maparrows/ddtarrow.txt"
statscreen_mapnamefont = "BigFont"
statscreen_finishedfont = "BigFont", "green"
statscreen_enteringfont = "BigFont", "green"
statscreen_mapnamefont = "*BigFont"
statscreen_finishedfont = "*BigFont", "green"
statscreen_enteringfont = "*BigFont", "green"
statscreen_coop = "CoopStatusScreen"
statscreen_dm = "DeathmatchStatusScreen"
statscreen_single = "DoomStatusScreen"
@@ -64,9 +64,9 @@ gameinfo
textscreeny = 10
defaultendsequence = "Inter_Cast"
maparrow = "maparrows/arrow.txt", "maparrows/ddtarrow.txt"
statscreen_mapnamefont = "BigFont"
statscreen_finishedfont = "BigFont", "red"
statscreen_enteringfont = "BigFont", "red"
statscreen_mapnamefont = "*BigFont"
statscreen_finishedfont = "*BigFont", "red"
statscreen_enteringfont = "*BigFont", "red"
statscreen_coop = "CoopStatusScreen"
statscreen_dm = "DeathmatchStatusScreen"
statscreen_single = "DoomStatusScreen"
@@ -63,9 +63,9 @@ gameinfo
textscreeny = 5
defaultendsequence = "Inter_Pic1"
maparrow = "maparrows/dagger.txt"
statscreen_mapnamefont = "BigFont"
statscreen_finishedfont = "SmallFont"
statscreen_enteringfont = "SmallFont"
statscreen_mapnamefont = "*BigFont"
statscreen_finishedfont = "*SmallFont"
statscreen_enteringfont = "*SmallFont"
statscreen_coop = "CoopStatusScreen"
statscreen_dm = "DeathmatchStatusScreen"
statscreen_single = "RavenStatusScreen"
@@ -61,9 +61,9 @@ gameinfo
textscreeny = 5
defaultendsequence = "Inter_Chess"
maparrow = "maparrows/dagger.txt"
statscreen_mapnamefont = "BigFont"
statscreen_finishedfont = "SmallFont"
statscreen_enteringfont = "SmallFont"
statscreen_mapnamefont = "*BigFont"
statscreen_finishedfont = "*SmallFont"
statscreen_enteringfont = "*SmallFont"
statscreen_coop = "CoopStatusScreen"
statscreen_dm = "DeathmatchStatusScreen"
statscreen_single = "RavenStatusScreen"
@@ -54,9 +54,9 @@ gameinfo
textscreeny = 10
defaultendsequence = "Inter_Cast"
maparrow = "maparrows/arrow.txt", "maparrows/ddtarrow.txt"
statscreen_mapnamefont = "BigFont"
statscreen_finishedfont = "BigFont"
statscreen_enteringfont = "BigFont"
statscreen_mapnamefont = "*BigFont"
statscreen_finishedfont = "*BigFont"
statscreen_enteringfont = "*BigFont"
messageboxclass = "MessageBoxMenu"
}

@@ -62,9 +62,9 @@ gameinfo
textscreeny = 10
defaultendsequence = "Inter_Strife"
maparrow = "maparrows/arrow.txt", "maparrows/ddtarrow.txt"
statscreen_mapnamefont = "BigFont"
statscreen_finishedfont = "BigFont", "white"
statscreen_enteringfont = "BigFont", "white"
statscreen_mapnamefont = "*BigFont"
statscreen_finishedfont = "*BigFont", "white"
statscreen_enteringfont = "*BigFont", "white"
statscreen_coop = "CoopStatusScreen"
statscreen_dm = "DeathmatchStatusScreen"
statscreen_single = "RavenStatusScreen"
@@ -17,7 +17,19 @@ struct PatchInfo play version("2.5")

void Init(GIFont gifont)
{
mFont = Font.GetFont(gifont.fontname);
// Replace with the VGA-Unicode font if needed.
// The default settings for this are marked with a *.
// If some mod changes this it is assumed that it doesn't provide any localization for the map name in a language not supported by the font.
String s = gifont.fontname;
if (s.CharAt(0) != "*")
mFont = Font.GetFont(gifont.fontname);
else if (generic_ui)
mFont = NewSmallFont;
else
{
s = s.Mid(1);
mFont = Font.GetFont(s);
}
mColor = Font.FindFontColor(gifont.color);
if (mFont == NULL)
{
@@ -150,7 +150,7 @@ class DoomStatusScreen : StatusScreen
let tcolor = useGfx? Font.CR_UNTRANSLATED : Font.CR_RED;

Font printFont;

Font textFont = generic_ui? NewSmallFont : BigFont;
if (useGfx)
{
printFont = IntermissionFont;
@@ -162,12 +162,12 @@ class DoomStatusScreen : StatusScreen
}
else
{
printFont = BigFont;
screen.DrawText (BigFont, tcolor, SP_STATSX, SP_STATSY, "$TXT_IMKILLS", DTA_Clean, true);
screen.DrawText (BigFont, tcolor, SP_STATSX, SP_STATSY+lh, "$TXT_IMITEMS", DTA_Clean, true);
screen.DrawText (BigFont, tcolor, SP_STATSX, SP_STATSY+2*lh, "$TXT_IMSECRETS", DTA_Clean, true);
screen.DrawText (BigFont, tcolor, SP_TIMEX, SP_TIMEY, "$TXT_IMTIME", DTA_Clean, true);
if (wbs.partime) screen.DrawText (BigFont, tcolor, 160 + SP_TIMEX, SP_TIMEY, "$TXT_IMPAR", DTA_Clean, true);
printFont = generic_ui? IntermissionFont : BigFont;
screen.DrawText (textFont, tcolor, SP_STATSX, SP_STATSY, "$TXT_IMKILLS", DTA_Clean, true);
screen.DrawText (textFont, tcolor, SP_STATSX, SP_STATSY+lh, "$TXT_IMITEMS", DTA_Clean, true);
screen.DrawText (textFont, tcolor, SP_STATSX, SP_STATSY+2*lh, "$TXT_IMSECRETS", DTA_Clean, true);
screen.DrawText (textFont, tcolor, SP_TIMEX, SP_TIMEY, "$TXT_IMTIME", DTA_Clean, true);
if (wbs.partime) screen.DrawText (textFont, tcolor, 160 + SP_TIMEX, SP_TIMEY, "$TXT_IMPAR", DTA_Clean, true);
}

drawPercent (printFont, 320 - SP_STATSX, SP_STATSY, cnt_kills[0], wbs.maxkills, true, tcolor);
@@ -189,7 +189,7 @@ class DoomStatusScreen : StatusScreen
}
else
{
screen.DrawText (printFont, Font.CR_UNTRANSLATED, x - printFont.StringWidth("$TXT_IMSUCKS"), y - printFont.GetHeight() - 2, "$TXT_IMSUCKS", DTA_Clean, true);
screen.DrawText (textFont, Font.CR_UNTRANSLATED, x - printFont.StringWidth("$TXT_IMSUCKS"), y - printFont.GetHeight() - 2, "$TXT_IMSUCKS", DTA_Clean, true);
}
}

@@ -209,10 +209,12 @@ class RavenStatusScreen : DoomStatusScreen
int lh = IntermissionFont.GetHeight() * 3 / 2;

drawLF();

screen.DrawText (BigFont, Font.CR_UNTRANSLATED, 50, 65, "$TXT_IMKILLS", DTA_Clean, true, DTA_Shadow, true);
screen.DrawText (BigFont, Font.CR_UNTRANSLATED, 50, 90, "$TXT_IMITEMS", DTA_Clean, true, DTA_Shadow, true);
screen.DrawText (BigFont, Font.CR_UNTRANSLATED, 50, 115, "$TXT_IMSECRETS", DTA_Clean, true, DTA_Shadow, true);

Font textFont = generic_ui? NewSmallFont : BigFont;

screen.DrawText (textFont, Font.CR_UNTRANSLATED, 50, 65, "$TXT_IMKILLS", DTA_Clean, true, DTA_Shadow, true);
screen.DrawText (textFont, Font.CR_UNTRANSLATED, 50, 90, "$TXT_IMITEMS", DTA_Clean, true, DTA_Shadow, true);
screen.DrawText (textFont, Font.CR_UNTRANSLATED, 50, 115, "$TXT_IMSECRETS", DTA_Clean, true, DTA_Shadow, true);

int countpos = gameinfo.gametype==GAME_Strife? 285:270;
if (sp_state >= 2)
@@ -229,7 +231,7 @@ class RavenStatusScreen : DoomStatusScreen
}
if (sp_state >= 8)
{
screen.DrawText (BigFont, Font.CR_UNTRANSLATED, 85, 160, "$TXT_IMTIME", DTA_Clean, true, DTA_Shadow, true);
screen.DrawText (textFont, Font.CR_UNTRANSLATED, 85, 160, "$TXT_IMTIME", DTA_Clean, true, DTA_Shadow, true);
drawTime (249, 160, cnt_time);
if (wi_showtotaltime)
{

0 comments on commit 9f5b000

Please sign in to comment.
You can’t perform that action at this time.