From 669d6c37306ca728e64836b61e9e466020129f48 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 12:52:03 +0100 Subject: ESP: render damage tags as small left-side labels Draw ARM/VULN/IMM on the left edge of the box with a 10px font and a black 1px shadow, instead of full-size text above the name. The small font is a second HFont created next to the 16px body font. CONTEXT: document the DrawModel argument fix and the tag styling. --- src/esp.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/esp.cpp') diff --git a/src/esp.cpp b/src/esp.cpp index aa9f645..51f46bc 100644 --- a/src/esp.cpp +++ b/src/esp.cpp @@ -1573,18 +1573,26 @@ void esp_draw() { const char *tag = nullptr; int tr = 255, tg = 255, tb = 255; if (t.damage == NPC_DMG_ARMORED) { - tag = "ARMORED"; + tag = "ARM"; tr = 255; tg = 170; tb = 60; } else if (t.damage == NPC_DMG_VULNERABLE) { tag = "VULN"; tr = 90; tg = 220; tb = 255; } else if (t.damage == NPC_DMG_IMMUNE) { - tag = "IMMUNE"; + tag = "IMM"; tr = 180; tg = 180; tb = 180; } - if (tag) - draw_text_col(left, top - (esp_option(ESP_OPT_SHOW_NAME) ? 28 : 14), - tag, tr, tg, tb); + if (tag) { + // Small label on the left edge of the box, black 1px shadow for + // readability against the world (the 10px ESP font). + int tw = (int)strlen(tag) * 6; + int tx = left - tw - 3; + if (tx < 2) + tx = 2; + int ty = top + 2; + draw_text_small_col(tx + 1, ty + 1, tag, 0, 0, 0); + draw_text_small_col(tx, ty, tag, tr, tg, tb); + } } } -- cgit v1.2.3