mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- added an option to only show the target mana/power bar if the target uses mana (by request)
This commit is contained in:
@ -26,6 +26,7 @@ function IceTargetMana.prototype:GetDefaultSettings()
|
|||||||
settings["offset"] = 2
|
settings["offset"] = 2
|
||||||
settings["upperText"] = "[PercentMP:Round]"
|
settings["upperText"] = "[PercentMP:Round]"
|
||||||
settings["lowerText"] = "[FractionalMP:PowerColor]"
|
settings["lowerText"] = "[FractionalMP:PowerColor]"
|
||||||
|
settings["onlyShowMana"] = false
|
||||||
|
|
||||||
return settings
|
return settings
|
||||||
end
|
end
|
||||||
@ -79,6 +80,11 @@ function IceTargetMana.prototype:Update(unit)
|
|||||||
else
|
else
|
||||||
self:Show(true)
|
self:Show(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.moduleSettings.onlyShowMana and UnitPowerType(self.unit) ~= 0 then
|
||||||
|
self:Show(false)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local manaType = UnitPowerType(self.unit)
|
local manaType = UnitPowerType(self.unit)
|
||||||
@ -129,6 +135,22 @@ function IceTargetMana.prototype:GetOptions()
|
|||||||
order = 51
|
order = 51
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opts["onlyShowMana"] = {
|
||||||
|
type = 'toggle',
|
||||||
|
name = 'Only show if target uses mana',
|
||||||
|
desc = 'Will only show this bar if the target uses mana (as opposed to rage, energy, runic power, etc.)',
|
||||||
|
get = function()
|
||||||
|
return self.moduleSettings.onlyShowMana
|
||||||
|
end,
|
||||||
|
set = function(v)
|
||||||
|
self.moduleSettings.onlyShowMana = v
|
||||||
|
self:Redraw()
|
||||||
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
return opts
|
return opts
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user