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:
@@ -317,15 +317,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user