v1.0.8.20: Fixed hotbar cooldowns showing through dialogue box when Show HUD during dialogue enabled

Made-with: Cursor
This commit is contained in:
2026-02-28 18:16:44 -05:00
parent fa0210a986
commit 2822f730f5
7 changed files with 85 additions and 21 deletions
+13 -8
View File
@@ -177,15 +177,20 @@ namespace HSUI.Interface.GeneralElements
if (showCd && slot.CooldownPercent > 0 && _pendingSlotIconIndex != i)
{
float total = 100f;
float elapsed = total - slot.CooldownPercent;
DrawHelper.DrawIconCooldown(pos, size, elapsed, total, drawList);
if (showCdNumbers && slot.CooldownSecondsLeft > 0)
// Skip cooldown overlay when slot overlaps game UI (e.g. dialogue box)
// to avoid hotbar cooldowns showing through during "Show HUD during dialogue"
if (!ClipRectsHelper.Instance.SlotOverlapsGameAddon(pos, size))
{
string cdText = slot.CooldownSecondsLeft.ToString();
Vector2 textSize = ImGui.CalcTextSize(cdText);
Vector2 textPos = pos + (size - textSize) * 0.5f;
DrawHelper.DrawOutlinedText(cdText, textPos, 0xFFFFFFFF, 0xFF000000, drawList, 1);
float total = 100f;
float elapsed = total - slot.CooldownPercent;
DrawHelper.DrawIconCooldown(pos, size, elapsed, total, drawList);
if (showCdNumbers && slot.CooldownSecondsLeft > 0)
{
string cdText = slot.CooldownSecondsLeft.ToString();
Vector2 textSize = ImGui.CalcTextSize(cdText);
Vector2 textPos = pos + (size - textSize) * 0.5f;
DrawHelper.DrawOutlinedText(cdText, textPos, 0xFFFFFFFF, 0xFF000000, drawList, 1);
}
}
}