mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- added bar/bg visibility options to mirrorbar, castbar, targetcastbar
- shuffled bar/bg visibility options to show up after the Enabled option and to be disabled if the bar is disabled - removed OnUpdate registration for mirrorbar since it handles OnUpdate itself - fixed a potential nil access in the DogTag fontstring stuff
This commit is contained in:
@ -42,8 +42,12 @@ function IceBarElement.prototype:Enable()
|
||||
self:RegisterEvent("PLAYER_TARGET_CHANGED", "TargetChanged")
|
||||
|
||||
if DogTag ~= nil then
|
||||
DogTag:AddFontString(self.frame.bottomUpperText, self.frame, self.unit, self.moduleSettings.upperText)
|
||||
DogTag:AddFontString(self.frame.bottomLowerText, self.frame, self.unit, self.moduleSettings.lowerText)
|
||||
if self.frame.bottomUpperText and self.moduleSettings.upperText then
|
||||
DogTag:AddFontString(self.frame.bottomUpperText, self.frame, self.unit, self.moduleSettings.upperText)
|
||||
end
|
||||
if self.frame.bottomLowerText and self.moduleSettings.lowerText then
|
||||
DogTag:AddFontString(self.frame.bottomLowerText, self.frame, self.unit, self.moduleSettings.lowerText)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -159,7 +163,10 @@ function IceBarElement.prototype:GetOptions()
|
||||
self.barFrame:Hide()
|
||||
end
|
||||
end,
|
||||
order = 13.1
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
end,
|
||||
order = 28
|
||||
}
|
||||
|
||||
opts["bgVisible"] = {
|
||||
@ -177,7 +184,10 @@ function IceBarElement.prototype:GetOptions()
|
||||
self.frame.bg:Hide()
|
||||
end
|
||||
end,
|
||||
order = 13.2
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
end,
|
||||
order = 29
|
||||
}
|
||||
|
||||
opts["shouldAnimate"] =
|
||||
@ -405,7 +415,9 @@ function IceBarElement.prototype:CreateFrame()
|
||||
self:CreateTexts()
|
||||
|
||||
self.frame:SetScale(self.moduleSettings.scale)
|
||||
self.frame:SetScript("OnUpdate", function() self:MyOnUpdate() end)
|
||||
if not string.find(self.elementName, "MirrorBar") then
|
||||
self.frame:SetScript("OnUpdate", function() self:MyOnUpdate() end)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user