mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- added option to use out-of-combat alpha on class power bars (holy power, shards) when targeting a friendly
This commit is contained in:
@ -252,6 +252,23 @@ function IceClassPowerCounter.prototype:GetOptions()
|
||||
order = 40,
|
||||
}
|
||||
|
||||
opts["hideFriendly"] = {
|
||||
type = "toggle",
|
||||
name = L["Friendly OOC alpha"],
|
||||
desc = L["If this is checked, then the counter will use your 'out of target' alpha when targeting someone who is friendly."],
|
||||
get = function()
|
||||
return self.moduleSettings.hideFriendly
|
||||
end,
|
||||
set = function(info, v)
|
||||
self.moduleSettings.hideFriendly = v
|
||||
self:Update(self.unit)
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
end,
|
||||
order = 41,
|
||||
}
|
||||
|
||||
return opts
|
||||
end
|
||||
|
||||
@ -274,6 +291,7 @@ function IceClassPowerCounter.prototype:GetDefaultSettings()
|
||||
defaults["gradient"] = true
|
||||
defaults["customMinColor"] = {r=1, g=1, b=0, a=1}
|
||||
defaults["customColor"] = {r=1, g=0, b=0, a=1}
|
||||
defaults["hideFriendly"] = false
|
||||
|
||||
return defaults
|
||||
end
|
||||
@ -401,7 +419,9 @@ end
|
||||
|
||||
function IceClassPowerCounter.prototype:CreateRuneFrame()
|
||||
-- create numeric runes
|
||||
self.frame.numeric = self:FontFactory(self.moduleSettings.runeFontSize, nil, self.frame.numeric)
|
||||
if not self.frame.numeric then
|
||||
self.frame.numeric = self:FontFactory(self.moduleSettings.runeFontSize, nil, self.frame.numeric)
|
||||
end
|
||||
|
||||
self.frame.numeric:SetWidth(50)
|
||||
self.frame.numeric:SetJustifyH("CENTER")
|
||||
@ -542,6 +562,10 @@ function IceClassPowerCounter.prototype:CheckCombat()
|
||||
self:Redraw()
|
||||
end
|
||||
|
||||
function IceClassPowerCounter.prototype:AlphaPassThroughTarget()
|
||||
return self.moduleSettings.hideFriendly and UnitIsFriend("player", "target")
|
||||
end
|
||||
|
||||
function IceClassPowerCounter.prototype:HideBlizz()
|
||||
assert(true, "Must override HideBlizz in child classes.")
|
||||
end
|
||||
|
Reference in New Issue
Block a user