diff --git a/Bartender4.lua b/Bartender4.lua index 71a1787..a806297 100644 --- a/Bartender4.lua +++ b/Bartender4.lua @@ -99,4 +99,10 @@ function Bartender4.modulePrototype:ToggleModule(info, value) self:Disable() end end + +function Bartender4.modulePrototype:ToggleOptions() + if self.options then + self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions + end +end Bartender4:SetDefaultModulePrototype(Bartender4.modulePrototype) diff --git a/Bartender4.toc b/Bartender4.toc index 9973c1d..2fee0c6 100644 --- a/Bartender4.toc +++ b/Bartender4.toc @@ -17,15 +17,10 @@ Bartender4.lua Options.lua ## Prototypes ## -Bar.lua -ButtonBar.lua -Button.lua +barPrototype\Bar.xml +buttonBarPrototype\ButtonBar.xml +buttonPrototypes\Buttons.xml ## Modules ## -ActionBars.lua -ActionBarPrototype.lua -ActionBarStates.lua -StanceBar.lua -PetBar.lua -MicroMenu.lua -BagBar.lua +actionBar\ActionBars.xml +specialBars\SpecialBars.xml diff --git a/ActionBars.lua b/actionBar/ActionBars.lua similarity index 91% rename from ActionBars.lua rename to actionBar/ActionBars.lua index 9558d1c..3c625db 100644 --- a/ActionBars.lua +++ b/actionBar/ActionBars.lua @@ -153,29 +153,6 @@ function BT4ActionBars:UpdateButtons(force) end end -function BT4ActionBars:CreateBarOption(id, options) - if not self.options then return end - - if not options then - options = self:GetOptionsTable() - end - - id = tostring(id) - if not self.options[id] then - self.options[id] = { - order = 10 + tonumber(id), - type = "group", - name = (L["Bar %s"]):format(id), - desc = (L["Configure Bar %s"]):format(id), - childGroups = "tab", - } - end - self.options[id].args = options - - -- register options in the BT GUI - Bartender4:RegisterBarOptions(id, self.options[id]) -end - function BT4ActionBars:ReassignBindings() if InCombatLockdown() then return end if not self.actionbars or not self.actionbars[1] then return end diff --git a/actionBar/ActionBars.xml b/actionBar/ActionBars.xml new file mode 100644 index 0000000..b78fb16 --- /dev/null +++ b/actionBar/ActionBars.xml @@ -0,0 +1,8 @@ + +