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
This commit is contained in:
@ -169,8 +169,6 @@ function IceCustomBar.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")
|
||||
@ -635,7 +633,7 @@ end
|
||||
-- 'Protected' methods --------------------------------------------------------
|
||||
|
||||
function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
|
||||
if not unitName or not buffName then
|
||||
if not unitName or not buffName or buffName == "" then
|
||||
return nil
|
||||
end
|
||||
|
||||
@ -776,6 +774,10 @@ function IceCustomBar.prototype:UpdateCustomBar(unit, fromUpdate)
|
||||
end
|
||||
|
||||
if IceHUD.IceCore:IsInConfigMode() or self.moduleSettings.displayAuraIcon then
|
||||
if IceHUD.IceCore:IsInConfigMode() and not self.barFrame.icon:GetTexture() then
|
||||
self.barFrame.icon:SetTexture("Interface\\Icons\\Spell_Frost_Frost")
|
||||
end
|
||||
|
||||
self.barFrame.icon:Show()
|
||||
else
|
||||
self.barFrame.icon:Hide()
|
||||
|
@ -278,7 +278,6 @@ function IceCustomCounterBar.prototype:CreateFrame()
|
||||
|
||||
if not self.barFrame.icon then
|
||||
self.barFrame.icon = self.masterFrame:CreateTexture(nil, "LOW")
|
||||
self.barFrame.icon:SetTexture(DefaultAuraIcon)
|
||||
self.barFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
|
||||
self.barFrame.icon:SetDrawLayer("OVERLAY")
|
||||
self.barFrame.icon:Hide()
|
||||
@ -306,10 +305,6 @@ function IceCustomCounterBar.prototype:UpdateAuraIcon()
|
||||
local auraIcon, _
|
||||
_, _, auraIcon = GetSpellInfo(self.moduleSettings.auraName)
|
||||
|
||||
if auraIcon == nil then
|
||||
auraIcon = "Interface\\Icons\\Spell_Frost_Frost"
|
||||
end
|
||||
|
||||
self.barFrame.icon:SetTexture(auraIcon)
|
||||
end
|
||||
|
||||
@ -319,6 +314,10 @@ function IceCustomCounterBar.prototype:UpdateCustomCount()
|
||||
local percent = IceHUD:Clamp(1.0 * points / (max > 0 and max or 1), 0, 1)
|
||||
|
||||
if IceHUD.IceCore:IsInConfigMode() then
|
||||
if not self.barFrame.icon:GetTexture() then
|
||||
self.barFrame.icon:SetTexture(DefaultAuraIcon)
|
||||
end
|
||||
|
||||
points = IceStackCounter_GetMaxCount(self)
|
||||
percent = 1
|
||||
self.barFrame.icon:Show()
|
||||
|
Reference in New Issue
Block a user