From 30d82c07fef12eaa67dd56497f7e409e1fbe6511 Mon Sep 17 00:00:00 2001 From: iceroth Date: Fri, 21 Jul 2006 18:08:50 +0000 Subject: [PATCH] Fixed a bug with disabled bars --- IceBarElement.lua | 42 +++++++++++++++++++----------------------- IceElement.lua | 1 + IceHUD.toc | 2 +- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/IceBarElement.lua b/IceBarElement.lua index f63b7fe..10ddcce 100644 --- a/IceBarElement.lua +++ b/IceBarElement.lua @@ -48,35 +48,31 @@ function IceBarElement.prototype:GetOptions() opts["side"] = { - type = 'group', - name = 'side', + type = 'text', + name = 'Side', desc = 'Side of the HUD where the bar appears', - args = { - left = { - type = 'execute', - name = 'left', - desc = "Left side", - func = function() - self.moduleSettings.side = IceCore.Side.Left - self:Redraw() - end - }, - right = { - type = 'execute', - name = 'right', - desc = "Right side", - func = function() - self.moduleSettings.side = IceCore.Side.Right - self:Redraw() - end - } - }, + get = function() + if (self.moduleSettings.side == IceCore.Side.Right) then + return "Right" + else + return "Left" + end + end, + set = function(value) + if (value == "Right") then + self.moduleSettings.side = IceCore.Side.Right + else + self.moduleSettings.side = IceCore.Side.Left + end + self:Redraw() + end, + validate = { "Left", "Right" }, order = 30 } opts["offset"] = { type = 'range', - name = 'offset', + name = 'Offset', desc = 'Offset of the bar', min = -1, max = 10, diff --git a/IceElement.lua b/IceElement.lua index 8548ccc..d8dceab 100644 --- a/IceElement.lua +++ b/IceElement.lua @@ -51,6 +51,7 @@ function IceElement.prototype:Create(parent) self.parent = parent self:CreateFrame() + self.frame:Hide() end diff --git a/IceHUD.toc b/IceHUD.toc index 4aa606e..bb82746 100644 --- a/IceHUD.toc +++ b/IceHUD.toc @@ -3,7 +3,7 @@ ## Name: IceHUD ## Title: IceHUD |cff7fff7f -Ace2-|r ## Notes: Another HUD mod -## Version: 0.2 ($Revision$) +## Version: 0.2.1 ($Revision$) ## SavedVariables: IceCoreDB ## X-Category: UnitFrame ## X-Date: $Date$