mirror of https://github.com/ZDoom/qzdoom.git
- handle generic fonts on the summary screen.
This commit is contained in:
parent
6a3bc716e3
commit
9f5b0001fe
|
@ -64,9 +64,9 @@ gameinfo
|
||||||
textscreeny = 10
|
textscreeny = 10
|
||||||
defaultendsequence = "Inter_Pic1"
|
defaultendsequence = "Inter_Pic1"
|
||||||
maparrow = "maparrows/arrow.txt", "maparrows/ddtarrow.txt"
|
maparrow = "maparrows/arrow.txt", "maparrows/ddtarrow.txt"
|
||||||
statscreen_mapnamefont = "BigFont"
|
statscreen_mapnamefont = "*BigFont"
|
||||||
statscreen_finishedfont = "BigFont", "green"
|
statscreen_finishedfont = "*BigFont", "green"
|
||||||
statscreen_enteringfont = "BigFont", "green"
|
statscreen_enteringfont = "*BigFont", "green"
|
||||||
statscreen_coop = "CoopStatusScreen"
|
statscreen_coop = "CoopStatusScreen"
|
||||||
statscreen_dm = "DeathmatchStatusScreen"
|
statscreen_dm = "DeathmatchStatusScreen"
|
||||||
statscreen_single = "DoomStatusScreen"
|
statscreen_single = "DoomStatusScreen"
|
||||||
|
|
|
@ -64,9 +64,9 @@ gameinfo
|
||||||
textscreeny = 10
|
textscreeny = 10
|
||||||
defaultendsequence = "Inter_Cast"
|
defaultendsequence = "Inter_Cast"
|
||||||
maparrow = "maparrows/arrow.txt", "maparrows/ddtarrow.txt"
|
maparrow = "maparrows/arrow.txt", "maparrows/ddtarrow.txt"
|
||||||
statscreen_mapnamefont = "BigFont"
|
statscreen_mapnamefont = "*BigFont"
|
||||||
statscreen_finishedfont = "BigFont", "red"
|
statscreen_finishedfont = "*BigFont", "red"
|
||||||
statscreen_enteringfont = "BigFont", "red"
|
statscreen_enteringfont = "*BigFont", "red"
|
||||||
statscreen_coop = "CoopStatusScreen"
|
statscreen_coop = "CoopStatusScreen"
|
||||||
statscreen_dm = "DeathmatchStatusScreen"
|
statscreen_dm = "DeathmatchStatusScreen"
|
||||||
statscreen_single = "DoomStatusScreen"
|
statscreen_single = "DoomStatusScreen"
|
||||||
|
|
|
@ -63,9 +63,9 @@ gameinfo
|
||||||
textscreeny = 5
|
textscreeny = 5
|
||||||
defaultendsequence = "Inter_Pic1"
|
defaultendsequence = "Inter_Pic1"
|
||||||
maparrow = "maparrows/dagger.txt"
|
maparrow = "maparrows/dagger.txt"
|
||||||
statscreen_mapnamefont = "BigFont"
|
statscreen_mapnamefont = "*BigFont"
|
||||||
statscreen_finishedfont = "SmallFont"
|
statscreen_finishedfont = "*SmallFont"
|
||||||
statscreen_enteringfont = "SmallFont"
|
statscreen_enteringfont = "*SmallFont"
|
||||||
statscreen_coop = "CoopStatusScreen"
|
statscreen_coop = "CoopStatusScreen"
|
||||||
statscreen_dm = "DeathmatchStatusScreen"
|
statscreen_dm = "DeathmatchStatusScreen"
|
||||||
statscreen_single = "RavenStatusScreen"
|
statscreen_single = "RavenStatusScreen"
|
||||||
|
|
|
@ -61,9 +61,9 @@ gameinfo
|
||||||
textscreeny = 5
|
textscreeny = 5
|
||||||
defaultendsequence = "Inter_Chess"
|
defaultendsequence = "Inter_Chess"
|
||||||
maparrow = "maparrows/dagger.txt"
|
maparrow = "maparrows/dagger.txt"
|
||||||
statscreen_mapnamefont = "BigFont"
|
statscreen_mapnamefont = "*BigFont"
|
||||||
statscreen_finishedfont = "SmallFont"
|
statscreen_finishedfont = "*SmallFont"
|
||||||
statscreen_enteringfont = "SmallFont"
|
statscreen_enteringfont = "*SmallFont"
|
||||||
statscreen_coop = "CoopStatusScreen"
|
statscreen_coop = "CoopStatusScreen"
|
||||||
statscreen_dm = "DeathmatchStatusScreen"
|
statscreen_dm = "DeathmatchStatusScreen"
|
||||||
statscreen_single = "RavenStatusScreen"
|
statscreen_single = "RavenStatusScreen"
|
||||||
|
|
|
@ -54,9 +54,9 @@ gameinfo
|
||||||
textscreeny = 10
|
textscreeny = 10
|
||||||
defaultendsequence = "Inter_Cast"
|
defaultendsequence = "Inter_Cast"
|
||||||
maparrow = "maparrows/arrow.txt", "maparrows/ddtarrow.txt"
|
maparrow = "maparrows/arrow.txt", "maparrows/ddtarrow.txt"
|
||||||
statscreen_mapnamefont = "BigFont"
|
statscreen_mapnamefont = "*BigFont"
|
||||||
statscreen_finishedfont = "BigFont"
|
statscreen_finishedfont = "*BigFont"
|
||||||
statscreen_enteringfont = "BigFont"
|
statscreen_enteringfont = "*BigFont"
|
||||||
messageboxclass = "MessageBoxMenu"
|
messageboxclass = "MessageBoxMenu"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,9 +62,9 @@ gameinfo
|
||||||
textscreeny = 10
|
textscreeny = 10
|
||||||
defaultendsequence = "Inter_Strife"
|
defaultendsequence = "Inter_Strife"
|
||||||
maparrow = "maparrows/arrow.txt", "maparrows/ddtarrow.txt"
|
maparrow = "maparrows/arrow.txt", "maparrows/ddtarrow.txt"
|
||||||
statscreen_mapnamefont = "BigFont"
|
statscreen_mapnamefont = "*BigFont"
|
||||||
statscreen_finishedfont = "BigFont", "white"
|
statscreen_finishedfont = "*BigFont", "white"
|
||||||
statscreen_enteringfont = "BigFont", "white"
|
statscreen_enteringfont = "*BigFont", "white"
|
||||||
statscreen_coop = "CoopStatusScreen"
|
statscreen_coop = "CoopStatusScreen"
|
||||||
statscreen_dm = "DeathmatchStatusScreen"
|
statscreen_dm = "DeathmatchStatusScreen"
|
||||||
statscreen_single = "RavenStatusScreen"
|
statscreen_single = "RavenStatusScreen"
|
||||||
|
|
|
@ -17,7 +17,19 @@ struct PatchInfo play version("2.5")
|
||||||
|
|
||||||
void Init(GIFont gifont)
|
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);
|
mColor = Font.FindFontColor(gifont.color);
|
||||||
if (mFont == NULL)
|
if (mFont == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -150,7 +150,7 @@ class DoomStatusScreen : StatusScreen
|
||||||
let tcolor = useGfx? Font.CR_UNTRANSLATED : Font.CR_RED;
|
let tcolor = useGfx? Font.CR_UNTRANSLATED : Font.CR_RED;
|
||||||
|
|
||||||
Font printFont;
|
Font printFont;
|
||||||
|
Font textFont = generic_ui? NewSmallFont : BigFont;
|
||||||
if (useGfx)
|
if (useGfx)
|
||||||
{
|
{
|
||||||
printFont = IntermissionFont;
|
printFont = IntermissionFont;
|
||||||
|
@ -162,12 +162,12 @@ class DoomStatusScreen : StatusScreen
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printFont = BigFont;
|
printFont = generic_ui? IntermissionFont : BigFont;
|
||||||
screen.DrawText (BigFont, tcolor, SP_STATSX, SP_STATSY, "$TXT_IMKILLS", DTA_Clean, true);
|
screen.DrawText (textFont, 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 (textFont, 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 (textFont, 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);
|
screen.DrawText (textFont, 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);
|
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);
|
drawPercent (printFont, 320 - SP_STATSX, SP_STATSY, cnt_kills[0], wbs.maxkills, true, tcolor);
|
||||||
|
@ -189,7 +189,7 @@ class DoomStatusScreen : StatusScreen
|
||||||
}
|
}
|
||||||
else
|
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;
|
int lh = IntermissionFont.GetHeight() * 3 / 2;
|
||||||
|
|
||||||
drawLF();
|
drawLF();
|
||||||
|
|
||||||
screen.DrawText (BigFont, Font.CR_UNTRANSLATED, 50, 65, "$TXT_IMKILLS", DTA_Clean, true, DTA_Shadow, true);
|
Font textFont = generic_ui? NewSmallFont : BigFont;
|
||||||
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);
|
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;
|
int countpos = gameinfo.gametype==GAME_Strife? 285:270;
|
||||||
if (sp_state >= 2)
|
if (sp_state >= 2)
|
||||||
|
@ -229,7 +231,7 @@ class RavenStatusScreen : DoomStatusScreen
|
||||||
}
|
}
|
||||||
if (sp_state >= 8)
|
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);
|
drawTime (249, 160, cnt_time);
|
||||||
if (wi_showtotaltime)
|
if (wi_showtotaltime)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue