From eed1e2dd6fb43359a7420b61d054d14f0e4dd1f1 Mon Sep 17 00:00:00 2001 From: Parnic Date: Thu, 7 Feb 2008 22:35:50 +0000 Subject: [PATCH] - did minor options table cleanup and made a console /icehudcl command so that IceHUD gets picked up by rock config --- IceBarElement.lua | 3 +++ IceHUD.lua | 7 ++++++- modules/CastBar.lua | 18 ++++++++++++++---- modules/TargetCast.lua | 18 ++++++++++++++---- 4 files changed, 37 insertions(+), 9 deletions(-) diff --git a/IceBarElement.lua b/IceBarElement.lua index fed6898..cb3a92e 100644 --- a/IceBarElement.lua +++ b/IceBarElement.lua @@ -159,6 +159,7 @@ function IceBarElement.prototype:GetOptions() { type = 'range', name = '|c' .. self.configColor .. 'Animation Duration|r', + desc = 'How long the animation should take to play', min = 0, max = 2, step = 0.05, @@ -260,6 +261,7 @@ function IceBarElement.prototype:GetOptions() self.moduleSettings.upperText = v self:Redraw() end, + usage = "" }, lowerTextString = { @@ -280,6 +282,7 @@ function IceBarElement.prototype:GetOptions() self.moduleSettings.lowerText = v self:Redraw() end, + usage = "" }, textVerticalOffset = { diff --git a/IceHUD.lua b/IceHUD.lua index 81c9f3a..d465ac1 100644 --- a/IceHUD.lua +++ b/IceHUD.lua @@ -7,6 +7,8 @@ IceHUD.Location = "Interface\\AddOns\\IceHUD" IceHUD.options = { type = 'group', + name = "IceHUD", + desc = "IceHUD", args = { headerGeneral = { @@ -497,7 +499,10 @@ function IceHUD:OnEnable() self.options.args.colors.args = self.IceCore:GetColorOptions() waterfall:Register("IceHUD", 'aceOptions', IceHUD.options) - + + -- Parnic - added /icehudcl to make rock config pick this up + self:RegisterChatCommand({"/icehudcl"}, IceHUD.options) self:RegisterChatCommand({ "/icehud" }, IceHUD.slashMenu) end + diff --git a/modules/CastBar.lua b/modules/CastBar.lua index f48504b..670054b 100644 --- a/modules/CastBar.lua +++ b/modules/CastBar.lua @@ -110,12 +110,22 @@ function CastBar.prototype:GetOptions() order = 43 } + -- Parnic - this exists solely for the console/rock config to work...animating cast bars doesn't make sense opts["shouldAnimate"] = { - } - - opts["desiredLerpTime"] = - { + type = 'toggle', + name = '|c' .. self.configColor .. 'Animate amount changes|r', + desc = 'Whether or not to animate the bar falloffs/gains', + get = function() + return self.moduleSettings.shouldAnimate + end, + set = function(value) + self.moduleSettings.shouldAnimate = value + self:Redraw() + end, + disabled = function() + return true + end } opts["textSettings"] = diff --git a/modules/TargetCast.lua b/modules/TargetCast.lua index 1bd9246..606bb59 100644 --- a/modules/TargetCast.lua +++ b/modules/TargetCast.lua @@ -56,12 +56,22 @@ end function TargetCast.prototype:GetOptions() local opts = TargetCast.super.prototype.GetOptions(self) + -- Parnic - this exists solely for the console/rock config to work...animating cast bars doesn't make sense opts["shouldAnimate"] = { - } - - opts["desiredLerpTime"] = - { + type = 'toggle', + name = '|c' .. self.configColor .. 'Animate amount changes|r', + desc = 'Whether or not to animate the bar falloffs/gains', + get = function() + return self.moduleSettings.shouldAnimate + end, + set = function(value) + self.moduleSettings.shouldAnimate = value + self:Redraw() + end, + disabled = function() + return true + end } return opts