From caa746668c05f37f0b69caab6dab8936b47e25b8 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Mon, 3 Dec 2007 22:43:37 +0000 Subject: [PATCH] just some random fixes and tweaks and cake --- ActionBars.lua | 17 ++++++----------- Options.lua | 1 + 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/ActionBars.lua b/ActionBars.lua index f4ed709..fe817d0 100644 --- a/ActionBars.lua +++ b/ActionBars.lua @@ -81,25 +81,21 @@ function BT4ActionBars:ForAllButtons(...) self:ForAll("ForAll", ...) end -local getFunc, setFunc +local getFunc do function getFunc(info) - return (info.arg and Bartender4.db.profile[info.arg] or Bartender4.db.profile[info[#info]]) - end - - function setFunc(info, value) local key = info.arg or info[#info] - Bartender4.db.profile[key] = value + return Bartender4.db.profile[key] end end function BT4ActionBars:SetupOptions() self.options = { + order = 20, type = "group", --cmdInline = true, name = "Action Bars", get = getFunc, - set = setFunc, args = { range = { order = 1, @@ -109,7 +105,7 @@ function BT4ActionBars:SetupOptions() style = "dropdown", arg = "OutOfRange", set = function(info, value) - setFunc(info, value) + Bartender4.db.profile.OutOfRange = value BT4ActionBars:ForAllButtons("UpdateUsable") end, values = { none = "No Display", button = "Full Button Mode", hotkey = "Hotkey Mode" }, @@ -151,9 +147,8 @@ end -- Creates a new bar object based on the id and the specified config function BT4ActionBars:Create(id, config) - local bar = setmetatable(Bartender4.Bar:Create(id, "SecureStateDriverTemplate", config), ActionBar_MT) - -- TODO: Setup Buttons and set bar width before pulling initial position - + local bar = setmetatable(Bartender4.Bar:Create(id, "SecureStateHeaderTemplate", config), ActionBar_MT) + bar:ApplyConfig() -- debugging --bar:Unlock() diff --git a/Options.lua b/Options.lua index 4f08892..cf7d625 100644 --- a/Options.lua +++ b/Options.lua @@ -28,6 +28,7 @@ function Bartender4:SetupOptions() guiHidden = true, }, general = { + order = 10, type = "group", --cmdInline = true, name = "General Settings",