mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- added an option to allow Rune cooldowns to be displayed in either a cooldown wipe or a simple alpha fade
This commit is contained in:
@ -119,6 +119,24 @@ function Runes.prototype:GetOptions()
|
||||
end,
|
||||
order = 35
|
||||
}
|
||||
|
||||
opts["cooldownMode"] = {
|
||||
type = 'text',
|
||||
name = 'Rune cooldown mode',
|
||||
desc = 'Choose whether the runes use a cooldown-style wipe or simply an alpha fade to show availability.',
|
||||
get = function()
|
||||
return self.moduleSettings.cooldownMode
|
||||
end,
|
||||
set = function(v)
|
||||
self.moduleSettings.cooldownMode = v
|
||||
self:Redraw()
|
||||
end,
|
||||
validate = { "Cooldown", "Alpha" },
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
end,
|
||||
order = 36
|
||||
}
|
||||
-- todo: numeric mode isn't supported just yet...so these options are removed for now
|
||||
--[[
|
||||
opts["runeFontSize"] = {
|
||||
@ -175,6 +193,7 @@ function Runes.prototype:GetDefaultSettings()
|
||||
defaults["hideBlizz"] = true
|
||||
defaults["alwaysFullAlpha"] = false
|
||||
defaults["displayMode"] = "Horizontal"
|
||||
defaults["cooldownMode"] = "Cooldown"
|
||||
|
||||
return defaults
|
||||
end
|
||||
@ -210,6 +229,7 @@ function Runes.prototype:UpdateRunePower(rune, usable)
|
||||
|
||||
if usable then
|
||||
-- self.frame.graphical[rune]:Show()
|
||||
if self.moduleSettings.cooldownMode == "Cooldown" then
|
||||
self.frame.graphical[rune].cd:Hide()
|
||||
|
||||
local fadeInfo={
|
||||
@ -219,10 +239,17 @@ function Runes.prototype:UpdateRunePower(rune, usable)
|
||||
finishedArg1 = rune
|
||||
}
|
||||
UIFrameFade(self.frame.graphical[rune].shine, fadeInfo);
|
||||
elseif self.moduleSettings.cooldownMode == "Alpha" then
|
||||
self.frame.graphical[rune]:SetAlpha(1)
|
||||
end
|
||||
else
|
||||
-- self.frame.graphical[rune]:Hide()
|
||||
if self.moduleSettings.cooldownMode == "Cooldown" then
|
||||
self.frame.graphical[rune].cd:SetCooldown(GetRuneCooldown(rune))
|
||||
self.frame.graphical[rune].cd:Show()
|
||||
elseif self.moduleSettings.cooldownMode == "Alpha" then
|
||||
self.frame.graphical[rune]:SetAlpha(0.2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user