mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
Only show placeholder icon when in config mode
If a CD bar was tracking a spell that was currently unknown to the player (such as the not-currently-active variations of Wildfire Bomb for Survival Hunters after first login/UI reload) then the placeholder frost icon would show up instead. The icon was only meant to be used to aid in configuration mode, so now the icon is set to the placeholder icon when config mode is enabled only. Technically we should clear the icon if it's set to the default whenever config mode is exited, but I figure config mode is pretty rare and should be okay for now.
This commit is contained in:
@ -132,8 +132,6 @@ function IceCustomCDBar.prototype:CreateBar()
|
||||
|
||||
if not self.barFrame.icon then
|
||||
self.barFrame.icon = self.masterFrame:CreateTexture(nil, "LOW")
|
||||
-- default texture so that 'config mode' can work without activating the bar first
|
||||
self.barFrame.icon:SetTexture("Interface\\Icons\\Spell_Frost_Frost")
|
||||
-- this cuts off the border around the buff icon
|
||||
self.barFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
|
||||
self.barFrame.icon:SetDrawLayer("OVERLAY")
|
||||
@ -675,6 +673,9 @@ function IceCustomCDBar.prototype:UpdateIcon()
|
||||
end
|
||||
|
||||
if IceHUD.IceCore:IsInConfigMode() or self.moduleSettings.displayAuraIcon then
|
||||
if not self.barFrame.icon:GetTexture() and IceHUD.IceCore:IsInConfigMode() then
|
||||
self.barFrame.icon:SetTexture("Interface\\Icons\\Spell_Frost_Frost")
|
||||
end
|
||||
self.barFrame.icon:Show()
|
||||
else
|
||||
self.barFrame.icon:Hide()
|
||||
@ -694,7 +695,10 @@ function IceCustomCDBar.prototype:UpdateItemUnitInventoryChanged(event, unit)
|
||||
end
|
||||
end
|
||||
|
||||
function IceCustomCDBar.prototype:UpdateCustomBarEvent()
|
||||
function IceCustomCDBar.prototype:UpdateCustomBarEvent(event, unit)
|
||||
if unit ~= self.unit then
|
||||
return
|
||||
end
|
||||
if not self.moduleSettings.cooldownType or self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL then
|
||||
self:UpdateCustomBar()
|
||||
end
|
||||
@ -722,6 +726,8 @@ function IceCustomCDBar.prototype:UpdateCustomBar(fromUpdate)
|
||||
else
|
||||
self.cooldownEndTime = remaining + now
|
||||
end
|
||||
|
||||
self:UpdateIcon()
|
||||
end
|
||||
|
||||
if self.cooldownEndTime and self.cooldownEndTime >= now then
|
||||
|
Reference in New Issue
Block a user