mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- Added a "When targeting" mode to custom cooldown bars that will always display the bar when a target is selected and never when no target is selected. (ticket #128)
This commit is contained in:
@ -3,7 +3,7 @@ IceCustomCDBar = IceCore_CreateClass(IceBarElement)
|
||||
|
||||
local IceHUD = _G.IceHUD
|
||||
|
||||
local validDisplayModes = {"Always", "When ready", "When cooling down"}
|
||||
local validDisplayModes = {"Always", "When ready", "When cooling down", "When targeting"}
|
||||
local validBuffTimers = {"none", "seconds", "minutes:seconds", "minutes"}
|
||||
local AuraIconWidth = 20
|
||||
local AuraIconHeight = 20
|
||||
@ -361,7 +361,7 @@ function IceCustomCDBar.prototype:GetOptions()
|
||||
return not self.moduleSettings.enabled
|
||||
end,
|
||||
hidden = function()
|
||||
return self.moduleSettings.displayMode == "Always"
|
||||
return self.moduleSettings.displayMode ~= "When ready"
|
||||
end,
|
||||
order = 31.4,
|
||||
}
|
||||
@ -703,6 +703,12 @@ function IceCustomCDBar.prototype:Show(bShouldShow, bForceHide)
|
||||
else
|
||||
IceCustomCDBar.super.prototype.Show(self, false)
|
||||
end
|
||||
elseif self.moduleSettings.displayMode == "When targeting" then
|
||||
if UnitExists("target") then
|
||||
IceCustomCDBar.super.prototype.Show(self, true)
|
||||
else
|
||||
IceCustomCDBar.super.prototype.Show(self, false)
|
||||
end
|
||||
else
|
||||
IceCustomCDBar.super.prototype.Show(self, bShouldShow)
|
||||
end
|
||||
|
Reference in New Issue
Block a user