mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 22:00:48 +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*/)
|
if (gamestate == GS_FULLCONSOLE || gamestate == GS_DEMOSCREEN/* || menuactive != MENU_Off*/)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
line = Top;
|
FFont* font = generic_ui ? NewSmallFont : AlternativeSmallFont;
|
||||||
|
|
||||||
|
line = Top + font->GetDisplacement();
|
||||||
canskip = true;
|
canskip = true;
|
||||||
|
|
||||||
FFont *font = generic_ui ? NewSmallFont : AlternativeSmallFont;
|
|
||||||
lineadv = font->GetHeight ();
|
lineadv = font->GetHeight ();
|
||||||
|
|
||||||
for (unsigned i = 0; i < Text.Size(); ++ i)
|
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();
|
if (!noTranslate) LoadTranslations();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FFont::ReadSheetFont(TArray<FolderEntry> &folderdata, int width, int height, const DVector2 &Scale)
|
void FFont::ReadSheetFont(TArray<FolderEntry> &folderdata, int width, int height, const DVector2 &Scale)
|
||||||
|
@ -1191,6 +1193,11 @@ void FFont::FixXMoves()
|
||||||
}
|
}
|
||||||
Chars[i].XMove = SpaceWidth;
|
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);
|
virtual void SetDefaultTranslation(uint32_t *colors);
|
||||||
void CheckCase();
|
void CheckCase();
|
||||||
|
|
||||||
|
int GetDisplacement() const { return Displacement; }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -147,6 +148,7 @@ protected:
|
||||||
int FontHeight;
|
int FontHeight;
|
||||||
int GlobalKerning;
|
int GlobalKerning;
|
||||||
int TranslationType = 0;
|
int TranslationType = 0;
|
||||||
|
int Displacement = 0;
|
||||||
char Cursor;
|
char Cursor;
|
||||||
bool noTranslate;
|
bool noTranslate;
|
||||||
bool translateUntranslated;
|
bool translateUntranslated;
|
||||||
|
|
Loading…
Reference in a new issue