mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- ticket #121 - patch for new visibility mode in CustomBars
This commit is contained in:
@ -117,6 +117,7 @@ function IceCustomBar.prototype:GetDefaultSettings()
|
||||
settings["barColor"] = {r=1, g=0, b=0, a=1}
|
||||
settings["trackOnlyMine"] = true
|
||||
settings["displayWhenEmpty"] = false
|
||||
settings["displayWhenTargeting"] = false
|
||||
settings["hideAnimationSettings"] = true
|
||||
settings["buffTimerDisplay"] = "minutes"
|
||||
settings["maxDuration"] = 0
|
||||
@ -366,6 +367,23 @@ function IceCustomBar.prototype:GetOptions()
|
||||
end,
|
||||
order = 30.9
|
||||
}
|
||||
|
||||
opts["displayWhenTargeting"] = {
|
||||
type = 'toggle',
|
||||
name = L["Display when targeting"],
|
||||
desc = L["Whether to display this bar when you target a unit, even if the buff/debuff specified is not present."],
|
||||
get = function()
|
||||
return self.moduleSettings.displayWhenTargeting
|
||||
end,
|
||||
set = function(info, v)
|
||||
self.moduleSettings.displayWhenTargeting = v
|
||||
self:UpdateCustomBar()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
end,
|
||||
order = 30.91
|
||||
}
|
||||
|
||||
opts["buffTimerDisplay"] = {
|
||||
type = 'select',
|
||||
@ -732,7 +750,9 @@ function IceCustomBar.prototype:OutCombat()
|
||||
end
|
||||
|
||||
function IceCustomBar.prototype:Show(bShouldShow)
|
||||
if self.moduleSettings.displayWhenEmpty then
|
||||
if self.moduleSettings.displayWhenTargeting and self.target then
|
||||
IceCustomBar.super.prototype.Show(self, true)
|
||||
elseif self.moduleSettings.displayWhenEmpty then
|
||||
if not self.bIsVisible then
|
||||
IceCustomBar.super.prototype.Show(self, true)
|
||||
end
|
||||
|
Reference in New Issue
Block a user