From 21824a042f883761f39c4723ad30e4e71f289c93 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Mon, 13 Feb 2023 13:55:33 +0300 Subject: [PATCH] gl: make hud fully usable on 640x400 --- src/game/renders/opengl/r_render.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game/renders/opengl/r_render.pas b/src/game/renders/opengl/r_render.pas index 369fa88..202500d 100644 --- a/src/game/renders/opengl/r_render.pas +++ b/src/game/renders/opengl/r_render.pas @@ -286,12 +286,14 @@ implementation end; procedure r_Render_DrawHUDArea (x, y, w, h: Integer; p: TPlayer); - var s: AnsiString; + var s: AnsiString; oldy: Integer; begin r_Common_DrawTexture(hudbg, x, y, w, h, TBasePoint.BP_LEFTUP); if p <> nil then begin + oldy := y; + if h < 239 then y := y - 32; (* hack: hide nickname on 640x400 *) r_Render_DrawHUD(x + w - 196 + 2, y, p); if p.Spectator then begin @@ -301,6 +303,7 @@ implementation if p.NoRespawn then r_Common_DrawText(_lc[I_PLAYER_SPECT1S], x + 4, y + 290, 255, 255, 255, 255, stdfont, TBasePoint.BP_LEFTUP); end; + y := oldy; end; if gShowPing and g_Game_IsClient then -- 2.29.2