From 86b647ed41f1ad0095b48142a5ae3c01a29d7f1f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 30 Apr 2016 13:03:08 +0200 Subject: [PATCH] - added map name display to IDMYPOS. --- src/g_shared/shared_hud.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/g_shared/shared_hud.cpp b/src/g_shared/shared_hud.cpp index 36ffdd5b5..4bfe85271 100644 --- a/src/g_shared/shared_hud.cpp +++ b/src/g_shared/shared_hud.cpp @@ -839,18 +839,26 @@ static void DrawCoordinates(player_t * CPlayer) int xpos = vwidth - SmallFont->StringWidth("X: -00000")-6; int ypos = 18; + screen->DrawText(SmallFont, hudcolor_titl, vwidth - 6 - SmallFont->StringWidth(level.MapName), ypos, level.MapName, + DTA_KeepRatio, true, + DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE); + + screen->DrawText(SmallFont, hudcolor_titl, vwidth - 6 - SmallFont->StringWidth(level.LevelName), ypos + h, level.LevelName, + DTA_KeepRatio, true, + DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE); + mysnprintf(coordstr, countof(coordstr), "X: %d", int(pos.X)); - screen->DrawText(SmallFont, hudcolor_xyco, xpos, ypos, coordstr, + screen->DrawText(SmallFont, hudcolor_xyco, xpos, ypos+2*h, coordstr, DTA_KeepRatio, true, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE); mysnprintf(coordstr, countof(coordstr), "Y: %d", int(pos.Y)); - screen->DrawText(SmallFont, hudcolor_xyco, xpos, ypos+h, coordstr, + screen->DrawText(SmallFont, hudcolor_xyco, xpos, ypos+3*h, coordstr, DTA_KeepRatio, true, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE); mysnprintf(coordstr, countof(coordstr), "Z: %d", int(pos.Z)); - screen->DrawText(SmallFont, hudcolor_xyco, xpos, ypos+2*h, coordstr, + screen->DrawText(SmallFont, hudcolor_xyco, xpos, ypos+4*h, coordstr, DTA_KeepRatio, true, DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight, TAG_DONE); }