mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 02:51:37 +00:00
- allow setting the font used for the status screen's content text.
But only works partially for Raven games (hacked). (drfrag) # Conflicts: # src/gi.cpp # wadsrc/static/mapinfo/chex.txt # wadsrc/static/mapinfo/doomcommon.txt # wadsrc/static/mapinfo/heretic.txt # wadsrc/static/mapinfo/hexen.txt # wadsrc/static/mapinfo/mindefaults.txt # wadsrc/static/mapinfo/strife.txt # wadsrc/static/zscript/ui/statscreen/statscreen_sp.zs # wadsrc_hacxextra/static/zmapinfo.txt
This commit is contained in:
parent
f9759dc894
commit
e51f9a6c13
11 changed files with 25 additions and 5 deletions
|
@ -62,6 +62,7 @@ DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mBackButton)
|
|||
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mStatscreenMapNameFont)
|
||||
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mStatscreenEnteringFont)
|
||||
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mStatscreenFinishedFont)
|
||||
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mStatscreenContentFont)
|
||||
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, gibfactor)
|
||||
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, intermissioncounter)
|
||||
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, statusscreen_single)
|
||||
|
@ -427,6 +428,7 @@ void FMapInfoParser::ParseGameInfo()
|
|||
GAMEINFOKEY_FONT(mStatscreenMapNameFont, "statscreen_mapnamefont")
|
||||
GAMEINFOKEY_FONT(mStatscreenFinishedFont, "statscreen_finishedfont")
|
||||
GAMEINFOKEY_FONT(mStatscreenEnteringFont, "statscreen_enteringfont")
|
||||
GAMEINFOKEY_FONT(mStatscreenContentFont, "statscreen_contentfont")
|
||||
GAMEINFOKEY_PATCH(mStatscreenFinishedFont, "statscreen_finishedpatch")
|
||||
GAMEINFOKEY_PATCH(mStatscreenEnteringFont, "statscreen_enteringpatch")
|
||||
GAMEINFOKEY_BOOL(norandomplayerclass, "norandomplayerclass")
|
||||
|
|
1
src/gi.h
1
src/gi.h
|
@ -187,6 +187,7 @@ struct gameinfo_t
|
|||
FGIFont mStatscreenMapNameFont;
|
||||
FGIFont mStatscreenFinishedFont;
|
||||
FGIFont mStatscreenEnteringFont;
|
||||
FGIFont mStatscreenContentFont;
|
||||
bool norandomplayerclass;
|
||||
bool forcekillscripts;
|
||||
FName statusscreen_single;
|
||||
|
|
|
@ -67,6 +67,7 @@ gameinfo
|
|||
statscreen_mapnamefont = "BigFont"
|
||||
statscreen_finishedpatch = "WIF"
|
||||
statscreen_enteringpatch = "WIENTER"
|
||||
statscreen_contentfont = "*BigFont"
|
||||
statscreen_coop = "CoopStatusScreen"
|
||||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "DoomStatusScreen"
|
||||
|
|
|
@ -67,6 +67,7 @@ gameinfo
|
|||
statscreen_mapnamefont = "BigFont"
|
||||
statscreen_finishedpatch = "WIF"
|
||||
statscreen_enteringpatch = "WIENTER"
|
||||
statscreen_contentfont = "*BigFont", "red"
|
||||
statscreen_coop = "CoopStatusScreen"
|
||||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "DoomStatusScreen"
|
||||
|
|
|
@ -66,6 +66,7 @@ gameinfo
|
|||
statscreen_mapnamefont = "BigFont"
|
||||
statscreen_finishedfont = "SmallFont"
|
||||
statscreen_enteringfont = "SmallFont"
|
||||
statscreen_contentfont = "*BigFont"
|
||||
statscreen_coop = "CoopStatusScreen"
|
||||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "RavenStatusScreen"
|
||||
|
|
|
@ -64,6 +64,7 @@ gameinfo
|
|||
statscreen_mapnamefont = "BigFont"
|
||||
statscreen_finishedfont = "SmallFont"
|
||||
statscreen_enteringfont = "SmallFont"
|
||||
statscreen_contentfont = "*BigFont"
|
||||
statscreen_coop = "CoopStatusScreen"
|
||||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "RavenStatusScreen"
|
||||
|
|
|
@ -57,6 +57,7 @@ gameinfo
|
|||
statscreen_mapnamefont = "BigFont"
|
||||
statscreen_finishedpatch = "WIF"
|
||||
statscreen_enteringpatch = "WIENTER"
|
||||
statscreen_contentfont = "*BigFont"
|
||||
messageboxclass = "MessageBoxMenu"
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ gameinfo
|
|||
statscreen_mapnamefont = "BigFont"
|
||||
statscreen_finishedfont = "BigFont", "white"
|
||||
statscreen_enteringfont = "BigFont", "white"
|
||||
statscreen_contentfont = "*BigFont"
|
||||
statscreen_coop = "CoopStatusScreen"
|
||||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "RavenStatusScreen"
|
||||
|
|
|
@ -309,6 +309,7 @@ struct Font native
|
|||
native int StringWidth(String code);
|
||||
native bool CanPrint(String code);
|
||||
native int GetHeight();
|
||||
int GetDisplacement() { return 0; } // hack hack
|
||||
native String GetCursor();
|
||||
|
||||
native static int FindFontColor(Name color);
|
||||
|
@ -388,6 +389,7 @@ struct GameInfoStruct native
|
|||
native GIFont mStatscreenMapNameFont;
|
||||
native GIFont mStatscreenEnteringFont;
|
||||
native GIFont mStatscreenFinishedFont;
|
||||
native GIFont mStatscreenContentFont;
|
||||
native double gibfactor;
|
||||
native bool intermissioncounter;
|
||||
native Name mSliderColor;
|
||||
|
|
|
@ -103,6 +103,7 @@ class StatusScreen abstract play version("2.5")
|
|||
PatchInfo mapname;
|
||||
PatchInfo finished;
|
||||
PatchInfo entering;
|
||||
PatchInfo content;
|
||||
|
||||
TextureID p_secret;
|
||||
TextureID kills;
|
||||
|
@ -418,6 +419,11 @@ class StatusScreen abstract play version("2.5")
|
|||
}
|
||||
}
|
||||
|
||||
void drawTimeFont (Font printFont, int x, int y, int t, int color) // hack hack
|
||||
{
|
||||
drawTime(x, y, t);
|
||||
}
|
||||
|
||||
|
||||
//====================================================================
|
||||
//
|
||||
|
@ -727,6 +733,7 @@ class StatusScreen abstract play version("2.5")
|
|||
entering.Init(gameinfo.mStatscreenEnteringFont);
|
||||
finished.Init(gameinfo.mStatscreenFinishedFont);
|
||||
mapname.Init(gameinfo.mStatscreenMapNameFont);
|
||||
content.Init(gameinfo.mStatscreenContentFont);
|
||||
|
||||
Kills = TexMan.CheckForTexture("WIOSTK", TexMan.Type_MiscPatch); // "kills"
|
||||
Secret = TexMan.CheckForTexture("WIOSTS", TexMan.Type_MiscPatch); // "scrt"
|
||||
|
|
|
@ -170,10 +170,12 @@ class RavenStatusScreen : DoomStatusScreen
|
|||
int lh = IntermissionFont.GetHeight() * 3 / 2;
|
||||
|
||||
drawLF();
|
||||
|
||||
screen.DrawText (BigFont, Font.CR_UNTRANSLATED, 50, 65, Stringtable.Localize("$TXT_IMKILLS"), DTA_Clean, true, DTA_Shadow, true);
|
||||
screen.DrawText (BigFont, Font.CR_UNTRANSLATED, 50, 90, Stringtable.Localize("$TXT_IMITEMS"), DTA_Clean, true, DTA_Shadow, true);
|
||||
screen.DrawText (BigFont, Font.CR_UNTRANSLATED, 50, 115, Stringtable.Localize("$TXT_IMSECRETS"), DTA_Clean, true, DTA_Shadow, true);
|
||||
|
||||
Font textFont = content.mFont;
|
||||
|
||||
screen.DrawText (textFont, Font.CR_UNTRANSLATED, 50, 65, Stringtable.Localize("$TXT_IMKILLS"), DTA_Clean, true, DTA_Shadow, true);
|
||||
screen.DrawText (textFont, Font.CR_UNTRANSLATED, 50, 90, Stringtable.Localize("$TXT_IMITEMS"), DTA_Clean, true, DTA_Shadow, true);
|
||||
screen.DrawText (textFont, Font.CR_UNTRANSLATED, 50, 115, Stringtable.Localize("$TXT_IMSECRETS"), DTA_Clean, true, DTA_Shadow, true);
|
||||
|
||||
int countpos = gameinfo.gametype==GAME_Strife? 285:270;
|
||||
if (sp_state >= 2)
|
||||
|
@ -190,7 +192,7 @@ class RavenStatusScreen : DoomStatusScreen
|
|||
}
|
||||
if (sp_state >= 8)
|
||||
{
|
||||
screen.DrawText (BigFont, Font.CR_UNTRANSLATED, 85, 160, Stringtable.Localize("$TXT_IMTIME"), DTA_Clean, true, DTA_Shadow, true);
|
||||
screen.DrawText (textFont, Font.CR_UNTRANSLATED, 85, 160, Stringtable.Localize("$TXT_IMTIME"), DTA_Clean, true, DTA_Shadow, true);
|
||||
drawTime (249, 160, cnt_time);
|
||||
if (wi_showtotaltime)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue