First thank you for your help, I got the options to show up now and there are no errors.
Now I'm trying to set up all the functions and I'm having some problems.
- One
I don't know how to set it so I can have the option to re position the bars. My code for that is this.
Core.lua
Code:
local defaults = {
profile = {
MAB = {
Enable = true,
HideMacronames = true,
HideGryphons = false,
Scale = .8,
["Position"] = {"BOTTOMLEFT",Minimap,-510,0},
},
local function ActionBars()
-- MainActionBar
for i = 1, 12 do
local MAB = _G["ActionButton"..i]
if (i == 1) then
MAB:ClearAllPoints()
MAB:SetPoint(unpack(db.MAB.Position))
MAB:SetScale(db.MAB.Scale)
else
MAB:ClearAllPoints()
MAB:SetPoint("LEFT", _G["ActionButton"..i-1],"RIGHT",6,0)
MAB:SetScale(db.MAB.Scale)
end
end
Config.lua
Code:
MAB = {
name = "MainActionBar",
type = "group",
order = 30,
args = {
Position= {
type = "input",
name = "Position",
order = 1,
set = function(info, val)
db.MAB.Position = val
MyAddon:UpdateStuff()
end,
get = function(info) return db.MAB.Position end,
},
},
- Second
I can get the end caps to show and hide but I can't get the micro names to do the same.
Core.lua
Code:
function Style(self)
local name = self:GetName()
local action = self.action
local Button = self
local Count = _G[name.."Count"]
local HotKey = _G[name.."HotKey"]
local Border = _G[name.."Border"]
local Btname = _G[name.."Name"]
local Normal = _G[name.."NormalTexture"]
Btname:Show()
Button:SetNormalTexture[[Interface\AddOns\MyAddon\Media\button]]
Border:Hide()
if db.MAB.HideMacronames then
Btname:Hide()
end
end
Config.lua
Code:
HideMacronames = {
type = "toggle",
name = "HideMacronames",
order = 2,
set = function(info, val)
db.MAB.HideMacronames = val
MyAddon:UpdateStuff()
end,
get = function(info) return db.MAB.HideMacronames end,
},