mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- offset notification messages so that the accents do not get cut off.
This essentially means that the tallest character in a font determines positioning.
This commit is contained in:
parent
bdb083f457
commit
89db16393e
3 changed files with 12 additions and 2 deletions
|
@ -1061,10 +1061,11 @@ void FNotifyBuffer::Draw()
|
|||
if (gamestate == GS_FULLCONSOLE || gamestate == GS_DEMOSCREEN/* || menuactive != MENU_Off*/)
|
||||
return;
|
||||
|
||||
line = Top;
|
||||
FFont* font = generic_ui ? NewSmallFont : AlternativeSmallFont;
|
||||
|
||||
line = Top + font->GetDisplacement();
|
||||
canskip = true;
|
||||
|
||||
FFont *font = generic_ui ? NewSmallFont : AlternativeSmallFont;
|
||||
lineadv = font->GetHeight ();
|
||||
|
||||
for (unsigned i = 0; i < Text.Size(); ++ i)
|
||||
|
|
|
@ -357,6 +357,8 @@ FFont::FFont (const char *name, const char *nametemplate, const char *filetempla
|
|||
}
|
||||
|
||||
if (!noTranslate) LoadTranslations();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void FFont::ReadSheetFont(TArray<FolderEntry> &folderdata, int width, int height, const DVector2 &Scale)
|
||||
|
@ -1191,6 +1193,11 @@ void FFont::FixXMoves()
|
|||
}
|
||||
Chars[i].XMove = SpaceWidth;
|
||||
}
|
||||
if (Chars[i].OriginalPic)
|
||||
{
|
||||
int ofs = Chars[i].OriginalPic->GetScaledTopOffset(0);
|
||||
if (ofs > Displacement) Displacement = ofs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ public:
|
|||
virtual void SetDefaultTranslation(uint32_t *colors);
|
||||
void CheckCase();
|
||||
|
||||
int GetDisplacement() const { return Displacement; }
|
||||
|
||||
|
||||
protected:
|
||||
|
@ -147,6 +148,7 @@ protected:
|
|||
int FontHeight;
|
||||
int GlobalKerning;
|
||||
int TranslationType = 0;
|
||||
int Displacement = 0;
|
||||
char Cursor;
|
||||
bool noTranslate;
|
||||
bool translateUntranslated;
|
||||
|
|
Loading…
Reference in a new issue