diff config.lua @ 57:4d359ee4649c

enable config option/gui for consolidated buff option
author Chris Mellon <arkanes@gmail.com>
date Wed, 13 Jul 2011 22:25:52 -0500
parents c4324144d380
children
line wrap: on
line diff
--- a/config.lua	Wed Jul 13 21:49:55 2011 -0500
+++ b/config.lua	Wed Jul 13 22:25:52 2011 -0500
@@ -11,4 +11,25 @@
 	profile = {
 		["consolidateBuffs"] = true,
 	}
-}
\ No newline at end of file
+}
+
+-- 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
\ No newline at end of file