View Single Post
10-17-12, 07:05 PM   #1
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Multiple Addon's One User Config

I'm trying to create a single .lua file that will transfer my personal config changes to Neav UI with its 10 seperate addons used. I think I'm close but I think it fires to soon for it to change the settings.

Below is my .lua if someone could give me a little help this would be great.


Thanks in advance.

Coke


Here is the file:

Code:
local _, nExtras = ...
local cfg = nExtras.Config

-- This is for a custom config profile of the Neav UI Addon's 
-- here you can change setting with any nAddon
-- so when updateing to a newer version you can 
-- keep your personal settings you like. Unless the Config has changed

-- Make sure when adding config options that it is case sensitive so make it match.

-- Examples for this area would be: nMainbar.Config.MainMenuBar.ShortBar = false


local _, nBuff = ...	-- Config Table for nBuff
local _, nChat = ...	-- Config Table for nChat
local _, nData = ...	-- Config table for nData
local _, nMainbar = ...	-- Config table for nMainbar
local _, nMinimap = ...	-- Config Table for nMinimap
local _, nPlates = ...	-- Config Table for nPlates
local _, nPower = ...	-- Config Table for nPower
local _, nTooltip = ...	-- Config Table for nTooltip
local _, ns = ... 	-- Config Table for oUF_Neav and oUF_NeavRaid
		
if cfg.NCP ~= true then return end

local f = CreateFrame("Frame")

function f:PROFILE()
	-- nBuff Customization's
	if (IsAddOnLoaded("nBuff")) then
		nBuff.Config = {
			buffSize = 50,
		}
	end

	-- nChat Customization's
	if (IsAddOnLoaded("nChat")) then
		nChat.Config = {
		
		}	
	end

	-- nData Customization's
	if (IsAddOnLoaded("nData")) then
		nData.Config = {
		
		}
	end
		
	-- nMainbar Customization's
	if (IsAddOnLoaded("nMainbar")) then
		nMainbar.Config = {
			shortBar = true,
		}
	end

	-- nMinimap Customization's
	if (IsAddOnLoaded("nMinimap")) then
		nMinimap.Config = {
		
		}
	end

	-- nPlates Customization's
	if (IsAddOnLoaded("nPlates")) then
		nPlates.Config = {
		
		}
	end

	-- nPower Customization's
	if (IsAddOnLoaded("nPower")) then
		nPower.Config = {
		
		}
	end

	-- nTooltip Customization's
	if (IsAddOnLoaded("nTooltip")) then
		nTooltip.Config = {
		
		}
	end

	-- oUF_Neav Customization's
	if (IsAddOnLoaded("oUF_Neav")) then
		ns.Config = {
		
		}
	end

	-- oUF_NeavRaid Customization's
	if (IsAddOnLoaded("oUF_NeavRaid")) then
		ns.Config = {
		
		}
	end
end

if (event == "PLAYER_LOGIN") then
	f:PROFILE()
end
f:RegisterEvent("PLAYER_LOGIN")
f:RegisterEvent("PROFILE")
  Reply With Quote