mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-13 07:57:58 +00:00
- fixed redundant map name display on alternative HUD's automap HUD.
This commit is contained in:
parent
1b077c560d
commit
31d1f8ba50
1 changed files with 15 additions and 12 deletions
|
@ -737,11 +737,11 @@ class AltHud ui
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawCoordinates(PlayerInfo CPlayer)
|
void DrawCoordinates(PlayerInfo CPlayer, bool withmapname)
|
||||||
{
|
{
|
||||||
Vector3 pos;
|
Vector3 pos;
|
||||||
String coordstr;
|
String coordstr;
|
||||||
int h = SmallFont.GetHeight() + 1;
|
int h = SmallFont.GetHeight();
|
||||||
let mo = CPlayer.mo;
|
let mo = CPlayer.mo;
|
||||||
|
|
||||||
if (!map_point_coordinates || !automapactive)
|
if (!map_point_coordinates || !automapactive)
|
||||||
|
@ -757,6 +757,8 @@ class AltHud ui
|
||||||
int xpos = hudwidth - SmallFont.StringWidth("X: -00000")-6;
|
int xpos = hudwidth - SmallFont.StringWidth("X: -00000")-6;
|
||||||
int ypos = 18;
|
int ypos = 18;
|
||||||
|
|
||||||
|
if (withmapname)
|
||||||
|
{
|
||||||
screen.DrawText(SmallFont, hudcolor_titl, hudwidth - 6 - SmallFont.StringWidth(Level.MapName), ypos, Level.MapName,
|
screen.DrawText(SmallFont, hudcolor_titl, hudwidth - 6 - SmallFont.StringWidth(Level.MapName), ypos, Level.MapName,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight);
|
||||||
|
@ -765,8 +767,9 @@ class AltHud ui
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight);
|
||||||
|
|
||||||
|
|
||||||
ypos += 3 * h;
|
ypos += 3 * h;
|
||||||
|
}
|
||||||
|
|
||||||
DrawCoordinateEntry(xpos, ypos, String.Format("X: %.0f", pos.X));
|
DrawCoordinateEntry(xpos, ypos, String.Format("X: %.0f", pos.X));
|
||||||
ypos += h;
|
ypos += h;
|
||||||
DrawCoordinateEntry(xpos, ypos, String.Format("Y: %.0f", pos.Y));
|
DrawCoordinateEntry(xpos, ypos, String.Format("Y: %.0f", pos.Y));
|
||||||
|
@ -935,7 +938,7 @@ class AltHud ui
|
||||||
y = DrawAmmo(CPlayer, hudwidth-5, y);
|
y = DrawAmmo(CPlayer, hudwidth-5, y);
|
||||||
if (hud_showweapons) DrawWeapons(CPlayer, hudwidth - 5, y);
|
if (hud_showweapons) DrawWeapons(CPlayer, hudwidth - 5, y);
|
||||||
DrawInventory(CPlayer, 144, hudheight - 28);
|
DrawInventory(CPlayer, 144, hudheight - 28);
|
||||||
if (idmypos) DrawCoordinates(CPlayer);
|
if (idmypos) DrawCoordinates(CPlayer, true);
|
||||||
|
|
||||||
int h = SmallFont.GetHeight();
|
int h = SmallFont.GetHeight();
|
||||||
y = h;
|
y = h;
|
||||||
|
@ -977,7 +980,7 @@ class AltHud ui
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight);
|
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight);
|
||||||
|
|
||||||
DrawCoordinates(CPlayer);
|
DrawCoordinates(CPlayer, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue