From a33582ca1b8e32887cddcb298d5c19f84edb898a Mon Sep 17 00:00:00 2001 From: AdamTadeusz Date: Tue, 10 Mar 2026 11:45:32 +0000 Subject: [PATCH] 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