View Single Post
08-28-11, 01:16 PM   #6
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by dreamcatcher View Post
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.
  1. 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,
		},
         },
  1. 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,
},
dreamcatcher im getting close maybe something in my code will help you solve your issue.

Post from wowace.com
WOOT!!



ok so i have my options in game now and its almost working right LOL.

Issues are:

1) does not load default setting to start yet in the options everything is checked. (see screenshot)

2) does not save option changes.

Here are my core.lua and config.lua for you to look at (fair warning the core is huge) did i do forget something did i add something i shouldn't have.

Any Help would be great.

And thank you to everyone who as helped me with the long process.

Coke
Hopefully we both can be up and running soon... havent played WoW in a week been to obsessed with getting this to work LOL

Hope this helps ya.

Coke
  Reply With Quote