- made some adjustments to the text spacing on the level summary screen.
With the extended fonts some parts here caused too large gaps.
This commit is contained in:
parent
32dd6b049c
commit
cd7438c02e
5 changed files with 42 additions and 12 deletions
|
|
@ -290,6 +290,7 @@ FFont::FFont (const char *name, const char *nametemplate, const char *filetempla
|
|||
auto count = maxchar - minchar + 1;
|
||||
Chars.Resize(count);
|
||||
int fontheight = 0;
|
||||
int asciiheight = 0;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
|
|
@ -311,6 +312,10 @@ FFont::FFont (const char *name, const char *nametemplate, const char *filetempla
|
|||
{
|
||||
fontheight = height;
|
||||
}
|
||||
if (height > asciiheight && FirstChar + 1 < 128)
|
||||
{
|
||||
asciiheight = height;
|
||||
}
|
||||
}
|
||||
|
||||
pic->SetUseType(ETextureType::FontChar);
|
||||
|
|
@ -352,6 +357,7 @@ FFont::FFont (const char *name, const char *nametemplate, const char *filetempla
|
|||
}
|
||||
}
|
||||
if (FontHeight == 0) FontHeight = fontheight;
|
||||
if (AsciiHeight == 0) AsciiHeight = asciiheight;
|
||||
|
||||
FixXMoves();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ protected:
|
|||
int FirstChar, LastChar;
|
||||
int SpaceWidth;
|
||||
int FontHeight;
|
||||
int AsciiHeight = 0;
|
||||
int GlobalKerning;
|
||||
int TranslationType = 0;
|
||||
int Displacement = 0;
|
||||
|
|
|
|||
|
|
@ -2000,6 +2000,17 @@ DEFINE_ACTION_FUNCTION_NATIVE(FFont, GetHeight, GetHeight)
|
|||
ACTION_RETURN_INT(self->GetHeight());
|
||||
}
|
||||
|
||||
static int GetDisplacement(FFont* font)
|
||||
{
|
||||
return font->GetDisplacement();
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(FFont, GetDisplacement, GetDisplacement)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FFont);
|
||||
ACTION_RETURN_INT(self->GetDisplacement());
|
||||
}
|
||||
|
||||
double GetBottomAlignOffset(FFont *font, int c);
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(FFont, GetBottomAlignOffset, GetBottomAlignOffset)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue