f99404c5a6
The MicroMenu can once again be vertical again, however it does not have a full-blown Rows configuration like the actionbars do, due to some issues with the non-square micromenu buttons. As a result of that, padding between the buttons is currently not available either. Its planned to make the MicroMenu use the default ButtonBar template too in the future.
54 lines
1.4 KiB
Lua
54 lines
1.4 KiB
Lua
local L = LibStub("AceLocale-3.0"):GetLocale("Bartender4")
|
|
|
|
local MicroMenuMod = Bartender4:GetModule("MicroMenu")
|
|
|
|
-- fetch upvalues
|
|
local Bar = Bartender4.Bar.prototype
|
|
|
|
function MicroMenuMod:SetupOptions()
|
|
if not self.options then
|
|
self.optionobject = Bar:GetOptionObject()
|
|
local enabled = {
|
|
type = "toggle",
|
|
order = 1,
|
|
name = L["Enabled"],
|
|
desc = L["Enable the Micro Menu"],
|
|
get = function() return self.db.profile.enabled end,
|
|
set = "ToggleModule",
|
|
handler = self,
|
|
}
|
|
self.optionobject:AddElement("general", "enabled", enabled)
|
|
|
|
local vertical = {
|
|
type = "toggle",
|
|
order = 150,
|
|
name = L["Vertical MicroMenu"],
|
|
desc = L["Show the MicroMenu vertically."],
|
|
get = function() return self.db.profile.vertical end,
|
|
set = function(info, state) self.db.profile.vertical = state; self.bar:PerformLayout() end,
|
|
}
|
|
self.optionobject:AddElement("general", "vertical", vertical)
|
|
|
|
self.disabledoptions = {
|
|
general = {
|
|
type = "group",
|
|
name = L["General Settings"],
|
|
cmdInline = true,
|
|
order = 1,
|
|
args = {
|
|
enabled = enabled,
|
|
}
|
|
}
|
|
}
|
|
self.options = {
|
|
order = 30,
|
|
type = "group",
|
|
name = L["Micro Menu"],
|
|
desc = L["Configure the Micro Menu"],
|
|
childGroups = "tab",
|
|
}
|
|
Bartender4:RegisterBarOptions("MicroMenu", self.options)
|
|
end
|
|
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
|
|
end
|