view config.lua @ 74:ab3b89b7de4f

update readme
author Chris Mellon <arkanes@gmail.com>
date Sat, 30 Jun 2012 18:50:35 -0500
parents 4d359ee4649c
children
line wrap: on
line source
local _, kbf = ...

-- These are the static options which can't be displayed/used by in-game configs
kbf.staticConfig = {}
kbf.staticConfig.BAR_HEIGHT = 16 -- note that you do have to update this in the XML as well if you change it 
kbf.staticConfig.BAR_WIDTH = 200 -- otherwise the hitbox for clicking off a buff won't be the same size as the displayed buff bar


-- default profile options
kbf.defaultConfig = {
	profile = {
		["consolidateBuffs"] = true,
	}
}

-- AceConfig options table
kbf.options = {
	type="group",
	args={
		consolidateBuffs = {
			name="Consolidate Buffs",
			desc="Enable or disable the consolidated buff collapsing",
			type="toggle",
			set=function(info, val) kbf:setConsolidatedBuffs(info, val) end,
			get=function(info) return kbf.db.profile.consolidateBuffs end
		}
	}
}

function kbf:setConsolidatedBuffs(info, val)
	self.db.profile.consolidateBuffs = val
	local attr = val and "99" or nil
	self.secureHeader:SetAttribute("consolidateTo", attr)
	self.dirty = true -- need a rescan
end