From a33582ca1b8e32887cddcb298d5c19f84edb898a Mon Sep 17 00:00:00 2001 From: AdamTadeusz Date: Tue, 10 Mar 2026 11:45:32 +0000 Subject: [PATCH 1/2] init --- src/game/client/neo/ui/neo_hud_childelement.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game/client/neo/ui/neo_hud_childelement.cpp b/src/game/client/neo/ui/neo_hud_childelement.cpp index 850b3014a5..dc6edfbe8a 100644 --- a/src/game/client/neo/ui/neo_hud_childelement.cpp +++ b/src/game/client/neo/ui/neo_hud_childelement.cpp @@ -59,13 +59,19 @@ CNEOHud_ChildElement::XYHudPos CNEOHud_ChildElement::DrawNeoHudRoundedCommon( const int x0, const int y0, const int x1, const int y1, Color color, bool topLeft, bool topRight, bool bottomLeft, bool bottomRight) const { - const XYHudPos p{ + XYHudPos p{ .x0w = x0 + m_rounded_width, .x1w = x1 - m_rounded_width, .y0h = y0 + m_rounded_height, .y1h = y1 - m_rounded_height, }; + if (p.y1h < p.y0h) + p.y1h = p.y0h = y0 + (0.5 * (y1 - y0)); + + if (p.x1w < p.x0w) + p.x1w = p.x0w = x0 + (0.5 * (x1 - x0)); + surface()->DrawSetColor(color); // Rounded corner pieces From 6b065ff5f2df391c8d68ccd9072452161484cac1 Mon Sep 17 00:00:00 2001 From: AdamTadeusz Date: Sun, 5 Apr 2026 09:26:52 +0100 Subject: [PATCH 2/2] divide by 2 --- src/game/client/neo/ui/neo_hud_childelement.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/client/neo/ui/neo_hud_childelement.cpp b/src/game/client/neo/ui/neo_hud_childelement.cpp index dc6edfbe8a..776a18090d 100644 --- a/src/game/client/neo/ui/neo_hud_childelement.cpp +++ b/src/game/client/neo/ui/neo_hud_childelement.cpp @@ -67,10 +67,10 @@ CNEOHud_ChildElement::XYHudPos CNEOHud_ChildElement::DrawNeoHudRoundedCommon( }; if (p.y1h < p.y0h) - p.y1h = p.y0h = y0 + (0.5 * (y1 - y0)); + p.y1h = p.y0h = y0 + ((y1 - y0) / 2); if (p.x1w < p.x0w) - p.x1w = p.x0w = x0 + (0.5 * (x1 - x0)); + p.x1w = p.x0w = x0 + ((x1 - x0) / 2); surface()->DrawSetColor(color);