mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- allow using the VGA font for map name display on the alternative HUD.
This commit is contained in:
parent
31d1f8ba50
commit
5e5780dd65
1 changed files with 14 additions and 9 deletions
|
@ -159,7 +159,7 @@ class AltHud ui
|
|||
let seconds = Thinker.Tics2Seconds(timer);
|
||||
String s = String.Format("%02i:%02i:%02i", seconds / 3600, (seconds % 3600) / 60, seconds % 60);
|
||||
int length = 8 * fnt.GetCharWidth("0");
|
||||
DrawHudText(SmallFont, color, s, x-length, y, trans);
|
||||
DrawHudText(fnt, color, s, x-length, y, trans);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -759,15 +759,18 @@ class AltHud ui
|
|||
|
||||
if (withmapname)
|
||||
{
|
||||
screen.DrawText(SmallFont, hudcolor_titl, hudwidth - 6 - SmallFont.StringWidth(Level.MapName), ypos, Level.MapName,
|
||||
let font = generic_hud? NewSmallFont : SmallFont;
|
||||
int hh = font.GetHeight();
|
||||
|
||||
screen.DrawText(font, hudcolor_titl, hudwidth - 6 - font.StringWidth(Level.MapName), ypos, Level.MapName,
|
||||
DTA_KeepRatio, true,
|
||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight);
|
||||
|
||||
screen.DrawText(SmallFont, hudcolor_titl, hudwidth - 6 - SmallFont.StringWidth(Level.LevelName), ypos + h, Level.LevelName,
|
||||
screen.DrawText(font, hudcolor_titl, hudwidth - 6 - font.StringWidth(Level.LevelName), ypos + hh, Level.LevelName,
|
||||
DTA_KeepRatio, true,
|
||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight);
|
||||
|
||||
ypos += 3 * h;
|
||||
ypos += 2 * hh + h;
|
||||
}
|
||||
|
||||
DrawCoordinateEntry(xpos, ypos, String.Format("X: %.0f", pos.X));
|
||||
|
@ -955,12 +958,14 @@ class AltHud ui
|
|||
|
||||
virtual void DrawAutomap(PlayerInfo CPlayer)
|
||||
{
|
||||
int fonth=SmallFont.GetHeight() + 1;
|
||||
let font = generic_hud? NewSmallFont : SmallFont;
|
||||
|
||||
int fonth = font.GetHeight() + 1;
|
||||
int bottom = hudheight - 1;
|
||||
|
||||
if (am_showtotaltime)
|
||||
{
|
||||
DrawTimeString(SmallFont, hudcolor_ttim, Level.totaltime, hudwidth-2, bottom, 1);
|
||||
DrawTimeString(font, hudcolor_ttim, Level.totaltime, hudwidth-2, bottom, 1);
|
||||
bottom -= fonth;
|
||||
}
|
||||
|
||||
|
@ -968,15 +973,15 @@ class AltHud ui
|
|||
{
|
||||
if (Level.clusterflags & Level.CLUSTER_HUB)
|
||||
{
|
||||
DrawTimeString(SmallFont, hudcolor_time, Level.time, hudwidth-2, bottom, 1);
|
||||
DrawTimeString(font, hudcolor_time, Level.time, hudwidth-2, bottom, 1);
|
||||
bottom -= fonth;
|
||||
}
|
||||
|
||||
// Single level time for hubs
|
||||
DrawTimeString(SmallFont, hudcolor_ltim, Level.maptime, hudwidth-2, bottom, 1);
|
||||
DrawTimeString(font, hudcolor_ltim, Level.maptime, hudwidth-2, bottom, 1);
|
||||
}
|
||||
|
||||
screen.DrawText(SmallFont, 0, 1, hudheight - fonth - 1, Level.FormatMapName(hudcolor_titl),
|
||||
screen.DrawText(font, Font.CR_BRICK, 2, hudheight - fonth - 1, Level.FormatMapName(hudcolor_titl),
|
||||
DTA_KeepRatio, true,
|
||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight);
|
||||
|
||||
|
|
Loading…
Reference in a new issue