mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- WIP version of optionally hiding TargetOfTarget modules if the player is the active target. everything seems to work except for TargetOfTargetHealth and I'm not quite sure why yet...need to check it out further
This commit is contained in:
@ -2,6 +2,8 @@ local AceOO = AceLibrary("AceOO-2.0")
|
||||
|
||||
local TargetTargetCast = AceOO.Class(IceCastBar)
|
||||
|
||||
local SelfDisplayModeOptions = {"Hide", "Normal"}
|
||||
|
||||
-- Constructor --
|
||||
function TargetTargetCast.prototype:init()
|
||||
TargetTargetCast.super.prototype.init(self, "TargetTargetCast")
|
||||
@ -25,6 +27,7 @@ function TargetTargetCast.prototype:GetDefaultSettings()
|
||||
settings["enabled"] = false
|
||||
settings["barVerticalOffset"] = 35
|
||||
settings["scale"] = 0.7
|
||||
settings["selfDisplayMode"] = "Normal"
|
||||
|
||||
return settings
|
||||
end
|
||||
@ -43,6 +46,11 @@ function TargetTargetCast.prototype:UpdateTargetTarget()
|
||||
self:StopBar()
|
||||
return
|
||||
end
|
||||
|
||||
if self.moduleSettings.selfDisplayMode == "Hide" and UnitIsUnit("player", self.unit) then
|
||||
self:StopBar()
|
||||
return
|
||||
end
|
||||
|
||||
local spell = UnitCastingInfo(self.unit)
|
||||
if (spell) then
|
||||
@ -129,6 +137,24 @@ function TargetTargetCast.prototype:GetOptions()
|
||||
end,
|
||||
order = 29
|
||||
}
|
||||
|
||||
opts["selfDisplayMode"] = {
|
||||
type = "text",
|
||||
name = "Self Display Mode",
|
||||
desc = "What this bar should do whenever the player is the TargetOfTarget",
|
||||
get = function()
|
||||
return self.moduleSettings.selfDisplayMode
|
||||
end,
|
||||
set = function(value)
|
||||
self.moduleSettings.selfDisplayMode = value
|
||||
self:Redraw()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
end,
|
||||
validate = SelfDisplayModeOptions,
|
||||
order = 44,
|
||||
}
|
||||
|
||||
return opts
|
||||
end
|
||||
|
Reference in New Issue
Block a user