commit the other half of that <.<

This commit is contained in:
Hendrik Leppkes
2008-06-20 00:03:21 +00:00
parent 14aa5efda4
commit 8060002efc
8 changed files with 16 additions and 14 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ end
-- Creates a new bar object based on the id and the specified config
function BT4ActionBars:Create(id, config)
local id = tostring(id)
local bar = setmetatable(Bartender4.ButtonBar:Create(id, config), ActionBar_MT)
local bar = setmetatable(Bartender4.ButtonBar:Create(id, config, (L["Bar %s"]):format(id)), ActionBar_MT)
bar.module = self
self:CreateBarOption(id)
+2 -2
View File
@@ -27,7 +27,7 @@ local noopFunc = function() end
function BagBarMod:OnEnable()
if not self.bar then
self.bar = setmetatable(Bartender4.ButtonBar:Create(L["Bag"], self.db.profile), {__index = BagBar})
self.bar = setmetatable(Bartender4.ButtonBar:Create("BagBar", self.db.profile, L["Bag Bar"]), {__index = BagBar})
-- TODO: real start position
self.bar:SetPoint("CENTER")
@@ -102,7 +102,7 @@ function BagBarMod:SetupOptions()
desc = L["Configure the Bag Bar"],
childGroups = "tab",
}
Bartender4:RegisterBarOptions(L["Bag"], self.options)
Bartender4:RegisterBarOptions("BagBar", self.options)
end
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
end
+3 -2
View File
@@ -64,13 +64,14 @@ Bartender4.Bar = {}
Bartender4.Bar.defaults = defaults
Bartender4.Bar.prototype = Bar
Bartender4.Bar.barregistry = barregistry
function Bartender4.Bar:Create(id, config)
function Bartender4.Bar:Create(id, config, name)
id = tostring(id)
assert(not barregistry[id], "duplicated entry in barregistry.")
local bar = setmetatable(CreateFrame("Frame", ("BT4Bar%s"):format(id), UIParent, "SecureStateHeaderTemplate"), Bar_MT)
barregistry[id] = bar
bar.id = id
bar.name = name or id
bar:SetMovable(true)
local overlay = CreateFrame("Button", bar:GetName() .. "Overlay", bar)
@@ -90,7 +91,7 @@ function Bartender4.Bar:Create(id, config)
overlay:SetBackdropBorderColor(0.5, 0.5, 0, 0)
overlay.Text = overlay:CreateFontString(nil, "ARTWORK")
overlay.Text:SetFontObject(GameFontNormal)
overlay.Text:SetText((tonumber(id) and L["Bar %s"] or L["%s Bar"]):format(id))
overlay.Text:SetText(name)
overlay.Text:Show()
overlay.Text:ClearAllPoints()
overlay.Text:SetPoint("CENTER", overlay, "CENTER")
+2 -2
View File
@@ -24,8 +24,8 @@ Bartender4.ButtonBar.defaults = defaults
local LBF = LibStub("LibButtonFacade", true)
function Bartender4.ButtonBar:Create(id, config)
local bar = setmetatable(Bartender4.Bar:Create(id, config), ButtonBar_MT)
function Bartender4.ButtonBar:Create(id, config, name)
local bar = setmetatable(Bartender4.Bar:Create(id, config, name), ButtonBar_MT)
if LBF then
bar.LBFGroup = LBF:Group("Bartender4", tostring(id))
+2 -2
View File
@@ -26,7 +26,7 @@ local noopFunc = function() end
function MicroMenuMod:OnEnable()
if not self.bar then
self.bar = setmetatable(Bartender4.Bar:Create(L["MicroMenu"], self.db.profile), {__index = MicroMenuBar})
self.bar = setmetatable(Bartender4.Bar:Create("MicroMenu", self.db.profile, L["Micro Menu"]), {__index = MicroMenuBar})
local buttons = {}
table_insert(buttons, CharacterMicroButton)
table_insert(buttons, SpellbookMicroButton)
@@ -98,7 +98,7 @@ function MicroMenuMod:SetupOptions()
desc = L["Configure the Micro Menu"],
childGroups = "tab",
}
Bartender4:RegisterBarOptions(L["MicroMenu"], self.options)
Bartender4:RegisterBarOptions("MicroMenu", self.options)
end
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
end
+2 -1
View File
@@ -1,6 +1,7 @@
--[[ $Id$ ]]
local L = LibStub("AceLocale-3.0"):GetLocale("Bartender4")
local FAQ = LibStub("AceLocale-3.0"):GetLocale("Bartender4_FAQ")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
@@ -131,7 +132,7 @@ local function getOptions()
args = {
faq = {
type = "description",
name = L["FAQ_TEXT"],
name = FAQ["FAQ_TEXT"],
},
},
},
+2 -2
View File
@@ -27,7 +27,7 @@ end
function PetBarMod:OnEnable()
if not self.bar then
self.bar = setmetatable(Bartender4.ButtonBar:Create(L["Pet"], self.db.profile), {__index = PetBar})
self.bar = setmetatable(Bartender4.ButtonBar:Create("PetBar", self.db.profile, L["Pet Bar"]), {__index = PetBar})
local buttons = {}
for i=1,10 do
@@ -162,7 +162,7 @@ function PetBarMod:SetupOptions()
desc = L["Configure the Pet Bar"],
childGroups = "tab",
}
Bartender4:RegisterBarOptions(L["Pet"], self.options)
Bartender4:RegisterBarOptions("PetBar", self.options)
end
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
end
+2 -2
View File
@@ -29,7 +29,7 @@ end
function StanceBarMod:OnEnable()
if not self.bar then
self.bar = setmetatable(Bartender4.ButtonBar:Create(L["Stance"], self.db.profile), {__index = StanceBar})
self.bar = setmetatable(Bartender4.ButtonBar:Create("StanceBar", self.db.profile, L["Stance Bar"]), {__index = StanceBar})
self.bar:ClearSetPoint("CENTER")
self.bar:SetScript("OnEvent", StanceBar.OnEvent)
@@ -93,7 +93,7 @@ function StanceBarMod:SetupOptions()
childGroups = "tab",
disabled = function(info) return GetNumShapeshiftForms() == 0 end,
}
Bartender4:RegisterBarOptions(L["Stance"], self.options)
Bartender4:RegisterBarOptions("StanceBar", self.options)
end
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
end