commit the other half of that <.<
This commit is contained in:
+1
-1
@@ -207,7 +207,7 @@ end
|
|||||||
-- Creates a new bar object based on the id and the specified config
|
-- Creates a new bar object based on the id and the specified config
|
||||||
function BT4ActionBars:Create(id, config)
|
function BT4ActionBars:Create(id, config)
|
||||||
local id = tostring(id)
|
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
|
bar.module = self
|
||||||
|
|
||||||
self:CreateBarOption(id)
|
self:CreateBarOption(id)
|
||||||
|
|||||||
+2
-2
@@ -27,7 +27,7 @@ local noopFunc = function() end
|
|||||||
|
|
||||||
function BagBarMod:OnEnable()
|
function BagBarMod:OnEnable()
|
||||||
if not self.bar then
|
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
|
-- TODO: real start position
|
||||||
self.bar:SetPoint("CENTER")
|
self.bar:SetPoint("CENTER")
|
||||||
@@ -102,7 +102,7 @@ function BagBarMod:SetupOptions()
|
|||||||
desc = L["Configure the Bag Bar"],
|
desc = L["Configure the Bag Bar"],
|
||||||
childGroups = "tab",
|
childGroups = "tab",
|
||||||
}
|
}
|
||||||
Bartender4:RegisterBarOptions(L["Bag"], self.options)
|
Bartender4:RegisterBarOptions("BagBar", self.options)
|
||||||
end
|
end
|
||||||
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
|
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -64,13 +64,14 @@ Bartender4.Bar = {}
|
|||||||
Bartender4.Bar.defaults = defaults
|
Bartender4.Bar.defaults = defaults
|
||||||
Bartender4.Bar.prototype = Bar
|
Bartender4.Bar.prototype = Bar
|
||||||
Bartender4.Bar.barregistry = barregistry
|
Bartender4.Bar.barregistry = barregistry
|
||||||
function Bartender4.Bar:Create(id, config)
|
function Bartender4.Bar:Create(id, config, name)
|
||||||
id = tostring(id)
|
id = tostring(id)
|
||||||
assert(not barregistry[id], "duplicated entry in barregistry.")
|
assert(not barregistry[id], "duplicated entry in barregistry.")
|
||||||
|
|
||||||
local bar = setmetatable(CreateFrame("Frame", ("BT4Bar%s"):format(id), UIParent, "SecureStateHeaderTemplate"), Bar_MT)
|
local bar = setmetatable(CreateFrame("Frame", ("BT4Bar%s"):format(id), UIParent, "SecureStateHeaderTemplate"), Bar_MT)
|
||||||
barregistry[id] = bar
|
barregistry[id] = bar
|
||||||
bar.id = id
|
bar.id = id
|
||||||
|
bar.name = name or id
|
||||||
bar:SetMovable(true)
|
bar:SetMovable(true)
|
||||||
|
|
||||||
local overlay = CreateFrame("Button", bar:GetName() .. "Overlay", bar)
|
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:SetBackdropBorderColor(0.5, 0.5, 0, 0)
|
||||||
overlay.Text = overlay:CreateFontString(nil, "ARTWORK")
|
overlay.Text = overlay:CreateFontString(nil, "ARTWORK")
|
||||||
overlay.Text:SetFontObject(GameFontNormal)
|
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:Show()
|
||||||
overlay.Text:ClearAllPoints()
|
overlay.Text:ClearAllPoints()
|
||||||
overlay.Text:SetPoint("CENTER", overlay, "CENTER")
|
overlay.Text:SetPoint("CENTER", overlay, "CENTER")
|
||||||
|
|||||||
+2
-2
@@ -24,8 +24,8 @@ Bartender4.ButtonBar.defaults = defaults
|
|||||||
|
|
||||||
local LBF = LibStub("LibButtonFacade", true)
|
local LBF = LibStub("LibButtonFacade", true)
|
||||||
|
|
||||||
function Bartender4.ButtonBar:Create(id, config)
|
function Bartender4.ButtonBar:Create(id, config, name)
|
||||||
local bar = setmetatable(Bartender4.Bar:Create(id, config), ButtonBar_MT)
|
local bar = setmetatable(Bartender4.Bar:Create(id, config, name), ButtonBar_MT)
|
||||||
|
|
||||||
if LBF then
|
if LBF then
|
||||||
bar.LBFGroup = LBF:Group("Bartender4", tostring(id))
|
bar.LBFGroup = LBF:Group("Bartender4", tostring(id))
|
||||||
|
|||||||
+2
-2
@@ -26,7 +26,7 @@ local noopFunc = function() end
|
|||||||
|
|
||||||
function MicroMenuMod:OnEnable()
|
function MicroMenuMod:OnEnable()
|
||||||
if not self.bar then
|
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 = {}
|
local buttons = {}
|
||||||
table_insert(buttons, CharacterMicroButton)
|
table_insert(buttons, CharacterMicroButton)
|
||||||
table_insert(buttons, SpellbookMicroButton)
|
table_insert(buttons, SpellbookMicroButton)
|
||||||
@@ -98,7 +98,7 @@ function MicroMenuMod:SetupOptions()
|
|||||||
desc = L["Configure the Micro Menu"],
|
desc = L["Configure the Micro Menu"],
|
||||||
childGroups = "tab",
|
childGroups = "tab",
|
||||||
}
|
}
|
||||||
Bartender4:RegisterBarOptions(L["MicroMenu"], self.options)
|
Bartender4:RegisterBarOptions("MicroMenu", self.options)
|
||||||
end
|
end
|
||||||
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
|
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
|
||||||
end
|
end
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
--[[ $Id$ ]]
|
--[[ $Id$ ]]
|
||||||
|
|
||||||
local L = LibStub("AceLocale-3.0"):GetLocale("Bartender4")
|
local L = LibStub("AceLocale-3.0"):GetLocale("Bartender4")
|
||||||
|
local FAQ = LibStub("AceLocale-3.0"):GetLocale("Bartender4_FAQ")
|
||||||
|
|
||||||
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
|
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
|
||||||
|
|
||||||
@@ -131,7 +132,7 @@ local function getOptions()
|
|||||||
args = {
|
args = {
|
||||||
faq = {
|
faq = {
|
||||||
type = "description",
|
type = "description",
|
||||||
name = L["FAQ_TEXT"],
|
name = FAQ["FAQ_TEXT"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
+2
-2
@@ -27,7 +27,7 @@ end
|
|||||||
|
|
||||||
function PetBarMod:OnEnable()
|
function PetBarMod:OnEnable()
|
||||||
if not self.bar then
|
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 = {}
|
local buttons = {}
|
||||||
for i=1,10 do
|
for i=1,10 do
|
||||||
@@ -162,7 +162,7 @@ function PetBarMod:SetupOptions()
|
|||||||
desc = L["Configure the Pet Bar"],
|
desc = L["Configure the Pet Bar"],
|
||||||
childGroups = "tab",
|
childGroups = "tab",
|
||||||
}
|
}
|
||||||
Bartender4:RegisterBarOptions(L["Pet"], self.options)
|
Bartender4:RegisterBarOptions("PetBar", self.options)
|
||||||
end
|
end
|
||||||
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
|
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
|
||||||
end
|
end
|
||||||
|
|||||||
+2
-2
@@ -29,7 +29,7 @@ end
|
|||||||
|
|
||||||
function StanceBarMod:OnEnable()
|
function StanceBarMod:OnEnable()
|
||||||
if not self.bar then
|
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:ClearSetPoint("CENTER")
|
||||||
self.bar:SetScript("OnEvent", StanceBar.OnEvent)
|
self.bar:SetScript("OnEvent", StanceBar.OnEvent)
|
||||||
@@ -93,7 +93,7 @@ function StanceBarMod:SetupOptions()
|
|||||||
childGroups = "tab",
|
childGroups = "tab",
|
||||||
disabled = function(info) return GetNumShapeshiftForms() == 0 end,
|
disabled = function(info) return GetNumShapeshiftForms() == 0 end,
|
||||||
}
|
}
|
||||||
Bartender4:RegisterBarOptions(L["Stance"], self.options)
|
Bartender4:RegisterBarOptions("StanceBar", self.options)
|
||||||
end
|
end
|
||||||
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
|
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user