mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
Added option to activate both Alpha and Cooldown to DK runes
This commit is contained in:
@ -123,7 +123,7 @@ function Runes.prototype:GetOptions()
|
|||||||
opts["cooldownMode"] = {
|
opts["cooldownMode"] = {
|
||||||
type = 'text',
|
type = 'text',
|
||||||
name = 'Rune cooldown mode',
|
name = 'Rune cooldown mode',
|
||||||
desc = 'Choose whether the runes use a cooldown-style wipe or simply an alpha fade to show availability.',
|
desc = 'Choose whether the runes use a cooldown-style wipe, simply an alpha fade to show availability or both.',
|
||||||
get = function()
|
get = function()
|
||||||
return self.moduleSettings.cooldownMode
|
return self.moduleSettings.cooldownMode
|
||||||
end,
|
end,
|
||||||
@ -131,7 +131,7 @@ function Runes.prototype:GetOptions()
|
|||||||
self.moduleSettings.cooldownMode = v
|
self.moduleSettings.cooldownMode = v
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
validate = { "Cooldown", "Alpha" },
|
validate = { "Cooldown", "Alpha", "Both" },
|
||||||
disabled = function()
|
disabled = function()
|
||||||
return not self.moduleSettings.enabled
|
return not self.moduleSettings.enabled
|
||||||
end,
|
end,
|
||||||
@ -260,6 +260,9 @@ function Runes.prototype:UpdateRunePower(rune, usable, dontFlash)
|
|||||||
self.frame.graphical[rune].cd:Hide()
|
self.frame.graphical[rune].cd:Hide()
|
||||||
elseif self.moduleSettings.cooldownMode == "Alpha" then
|
elseif self.moduleSettings.cooldownMode == "Alpha" then
|
||||||
self.frame.graphical[rune]:SetAlpha(1)
|
self.frame.graphical[rune]:SetAlpha(1)
|
||||||
|
elseif self.moduleSettings.cooldownMode == "Both" then
|
||||||
|
self.frame.graphical[rune].cd:Hide()
|
||||||
|
self.frame.graphical[rune]:SetAlpha(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not dontFlash then
|
if not dontFlash then
|
||||||
@ -277,6 +280,10 @@ function Runes.prototype:UpdateRunePower(rune, usable, dontFlash)
|
|||||||
self.frame.graphical[rune].cd:Show()
|
self.frame.graphical[rune].cd:Show()
|
||||||
elseif self.moduleSettings.cooldownMode == "Alpha" then
|
elseif self.moduleSettings.cooldownMode == "Alpha" then
|
||||||
self.frame.graphical[rune]:SetAlpha(0.2)
|
self.frame.graphical[rune]:SetAlpha(0.2)
|
||||||
|
elseif self.moduleSettings.cooldownMode == "Both" then
|
||||||
|
self.frame.graphical[rune].cd:SetCooldown(GetRuneCooldown(rune))
|
||||||
|
self.frame.graphical[rune].cd:Show()
|
||||||
|
self.frame.graphical[rune]:SetAlpha(0.2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user