mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- use BigUpper font for option menu captions.
This commit is contained in:
parent
b48f7da43e
commit
cad2f49ceb
8 changed files with 17 additions and 9 deletions
|
@ -1453,6 +1453,10 @@ void V_InitFonts()
|
|||
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;
|
||||
|
|
|
@ -150,7 +150,7 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
extern FFont *SmallFont, *SmallFont2, *BigFont, *ConFont, *IntermissionFont;
|
||||
extern FFont *SmallFont, *SmallFont2, *BigFont, *BigUpper, *ConFont, *IntermissionFont;
|
||||
|
||||
void V_InitFonts();
|
||||
void V_ClearFonts();
|
||||
|
|
|
@ -248,12 +248,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;
|
||||
|
|
|
@ -1231,6 +1231,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)
|
||||
|
|
|
@ -196,6 +196,7 @@ public:
|
|||
int mIndent;
|
||||
int mPosition;
|
||||
bool mDontDim;
|
||||
FFont *mFont;
|
||||
|
||||
void CalcIndent();
|
||||
DMenuItemBase *GetItem(FName name);
|
||||
|
|
|
@ -1168,6 +1168,7 @@ void M_StartupEpisodeMenu(FGameStartup *gs)
|
|||
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;
|
||||
|
|
|
@ -145,7 +145,7 @@ public:
|
|||
|
||||
int DisplayWidth, DisplayHeight;
|
||||
|
||||
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