mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 02:51:37 +00:00
- use BigUpper font for option menu captions.
# Conflicts: # src/gamedata/fonts/v_font.cpp There's actually no BigUpper font here. (drfrag)
This commit is contained in:
parent
08cd080597
commit
d14a48f8f4
8 changed files with 21 additions and 13 deletions
|
@ -296,12 +296,12 @@ void DIntermissionScreenFader::Drawer ()
|
|||
|
||||
void DIntermissionScreenText::Init(FIntermissionAction *desc, bool first)
|
||||
{
|
||||
bool usesDefault = mTextX < 0;
|
||||
Super::Init(desc, first);
|
||||
mText = static_cast<FIntermissionActionTextscreen*>(desc)->mText;
|
||||
if (mText[0] == '$') mText = GStrings(&mText[1]);
|
||||
mTextSpeed = static_cast<FIntermissionActionTextscreen*>(desc)->mTextSpeed;
|
||||
mTextX = static_cast<FIntermissionActionTextscreen*>(desc)->mTextX;
|
||||
bool usesDefault = mTextX < 0;
|
||||
if (mTextX < 0) mTextX =gameinfo.TextScreenX;
|
||||
mTextY = static_cast<FIntermissionActionTextscreen*>(desc)->mTextY;
|
||||
if (mTextY < 0) mTextY =gameinfo.TextScreenY;
|
||||
|
|
|
@ -1155,6 +1155,7 @@ DEFINE_FIELD(DOptionMenuDescriptor, mScrollPos)
|
|||
DEFINE_FIELD(DOptionMenuDescriptor, mIndent)
|
||||
DEFINE_FIELD(DOptionMenuDescriptor, mPosition)
|
||||
DEFINE_FIELD(DOptionMenuDescriptor, mDontDim)
|
||||
DEFINE_FIELD(DOptionMenuDescriptor, mFont)
|
||||
|
||||
DEFINE_FIELD(FOptionMenuSettings, mTitleColor)
|
||||
DEFINE_FIELD(FOptionMenuSettings, mFontColor)
|
||||
|
|
|
@ -194,6 +194,7 @@ public:
|
|||
int mIndent;
|
||||
int mPosition;
|
||||
bool mDontDim;
|
||||
FFont *mFont;
|
||||
|
||||
void CalcIndent();
|
||||
DMenuItemBase *GetItem(FName name);
|
||||
|
|
|
@ -1161,6 +1161,7 @@ static void BuildEpisodeMenu()
|
|||
DOptionMenuDescriptor *od = Create<DOptionMenuDescriptor>();
|
||||
MenuDescriptors[NAME_Episodemenu] = od;
|
||||
od->mMenuName = NAME_Episodemenu;
|
||||
od->mFont = gameinfo.gametype == GAME_Doom ? BigUpper : BigFont;
|
||||
od->mTitle = "$MNU_EPISODE";
|
||||
od->mSelectedItem = 0;
|
||||
od->mScrollPos = 0;
|
||||
|
|
|
@ -3581,28 +3581,32 @@ void V_InitFonts()
|
|||
{
|
||||
if (Wads.CheckNumForName ("FONTA_S") >= 0)
|
||||
{
|
||||
SmallFont = new FFont ("SmallFont", "FONTA%02u", "defsmallfont", HU_FONTSTART, HU_FONTSIZE, 1, -1);
|
||||
SmallFont = new FFont("SmallFont", "FONTA%02u", "defsmallfont", HU_FONTSTART, HU_FONTSIZE, 1, -1);
|
||||
SmallFont->SetCursor('[');
|
||||
}
|
||||
else if (Wads.CheckNumForName ("STCFN033", ns_graphics) >= 0)
|
||||
{
|
||||
SmallFont = new FFont ("SmallFont", "STCFN%.3d", "defsmallfont", HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART, -1);
|
||||
SmallFont = new FFont("SmallFont", "STCFN%.3d", "defsmallfont", HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART, -1);
|
||||
}
|
||||
}
|
||||
if (!(SmallFont2 = V_GetFont("SmallFont2"))) // Only used by Strife
|
||||
{
|
||||
if (Wads.CheckNumForName ("STBFN033", ns_graphics) >= 0)
|
||||
{
|
||||
SmallFont2 = new FFont ("SmallFont2", "STBFN%.3d", "defsmallfont2", HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART, -1);
|
||||
SmallFont2 = new FFont("SmallFont2", "STBFN%.3d", "defsmallfont2", HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART, -1);
|
||||
}
|
||||
}
|
||||
if (!(BigFont = V_GetFont("BigFont")))
|
||||
{
|
||||
if (gameinfo.gametype & GAME_Raven)
|
||||
{
|
||||
BigFont = new FFont ("BigFont", "FONTB%02u", "defbigfont", HU_FONTSTART, HU_FONTSIZE, 1, -1);
|
||||
BigFont = new FFont("BigFont", "FONTB%02u", "defbigfont", HU_FONTSTART, HU_FONTSIZE, 1, -1);
|
||||
}
|
||||
}
|
||||
if (!(BigUpper = V_GetFont("BigUpper")))
|
||||
{
|
||||
BigUpper = BigFont;
|
||||
}
|
||||
if (!(ConFont = V_GetFont("ConsoleFont", "CONFONT")))
|
||||
{
|
||||
ConFont = SmallFont;
|
||||
|
|
|
@ -144,7 +144,7 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
extern FFont *SmallFont, *SmallFont2, *BigFont, *ConFont, *IntermissionFont;
|
||||
extern FFont *SmallFont, *SmallFont2, *BigFont, *BigUpper, *ConFont, *IntermissionFont;
|
||||
|
||||
void V_InitFonts();
|
||||
void V_ClearFonts();
|
||||
|
|
|
@ -155,7 +155,7 @@ const FTexture::Span FPaletteTester::DummySpan[2] = { { 0, 16 }, { 0, 0 } };
|
|||
|
||||
int DisplayWidth, DisplayHeight, DisplayBits;
|
||||
|
||||
FFont *SmallFont, *SmallFont2, *BigFont, *ConFont, *IntermissionFont;
|
||||
FFont *SmallFont, *SmallFont2, *BigFont, *BigUpper, *ConFont, *IntermissionFont;
|
||||
|
||||
uint32_t Col2RGB8[65][256];
|
||||
uint32_t *Col2RGB8_LessPrecision[65];
|
||||
|
|
|
@ -55,6 +55,7 @@ class OptionMenuDescriptor : MenuDescriptor native
|
|||
native int mIndent;
|
||||
native int mPosition;
|
||||
native bool mDontDim;
|
||||
native Font mFont;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
|
@ -224,9 +225,9 @@ class OptionMenu : Menu
|
|||
|
||||
if (y <= 0)
|
||||
{
|
||||
if (BigFont && mDesc.mTitle.Length() > 0)
|
||||
if (mDesc.mFont && mDesc.mTitle.Length() > 0)
|
||||
{
|
||||
y = -y + BigFont.GetHeight();
|
||||
y = -y + mDesc.mFont.GetHeight();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -415,13 +416,13 @@ class OptionMenu : Menu
|
|||
|
||||
if (y <= 0)
|
||||
{
|
||||
if (BigFont && mDesc.mTitle.Length() > 0)
|
||||
if (mDesc.mFont && mDesc.mTitle.Length() > 0)
|
||||
{
|
||||
let tt = Stringtable.Localize(mDesc.mTitle);
|
||||
screen.DrawText (BigFont, OptionMenuSettings.mTitleColor,
|
||||
(screen.GetWidth() - BigFont.StringWidth(tt) * CleanXfac_1) / 2, 10*CleanYfac_1,
|
||||
screen.DrawText (mDesc.mFont, OptionMenuSettings.mTitleColor,
|
||||
(screen.GetWidth() - mDesc.mFont.StringWidth(tt) * CleanXfac_1) / 2, 10*CleanYfac_1,
|
||||
tt, DTA_CleanNoMove_1, true);
|
||||
y = -y + BigFont.GetHeight();
|
||||
y = -y + mDesc.mFont.GetHeight();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue