annotate config.lua @ 65:e19d0380b9f3
 
finished investigation into the 4.3 issues, clean up to address some of the bugs that were fixed
 | author | 
 Chris Mellon <arkanes@gmail.com> | 
 | date | 
 Sat, 03 Dec 2011 07:30:24 -0600 | 
 | parents | 
 4d359ee4649c  | 
 | children | 
  | 
 | rev | 
   line source | 
  
| 
arkanes@54
 | 
     1 local _, kbf = ...
 | 
| 
arkanes@54
 | 
     2 
 | 
| 
arkanes@54
 | 
     3 -- These are the static options which can't be displayed/used by in-game configs
 | 
| 
arkanes@54
 | 
     4 kbf.staticConfig = {}
 | 
| 
arkanes@54
 | 
     5 kbf.staticConfig.BAR_HEIGHT = 16 -- note that you do have to update this in the XML as well if you change it 
 | 
| 
arkanes@54
 | 
     6 kbf.staticConfig.BAR_WIDTH = 200 -- otherwise the hitbox for clicking off a buff won't be the same size as the displayed buff bar
 | 
| 
arkanes@54
 | 
     7 
 | 
| 
arkanes@54
 | 
     8 
 | 
| 
arkanes@54
 | 
     9 -- default profile options
 | 
| 
arkanes@54
 | 
    10 kbf.defaultConfig = {
 | 
| 
arkanes@54
 | 
    11 	profile = {
 | 
| 
arkanes@54
 | 
    12 		["consolidateBuffs"] = true,
 | 
| 
arkanes@54
 | 
    13 	}
 | 
| 
arkanes@57
 | 
    14 }
 | 
| 
arkanes@57
 | 
    15 
 | 
| 
arkanes@57
 | 
    16 -- AceConfig options table
 | 
| 
arkanes@57
 | 
    17 kbf.options = {
 | 
| 
arkanes@57
 | 
    18 	type="group",
 | 
| 
arkanes@57
 | 
    19 	args={
 | 
| 
arkanes@57
 | 
    20 		consolidateBuffs = {
 | 
| 
arkanes@57
 | 
    21 			name="Consolidate Buffs",
 | 
| 
arkanes@57
 | 
    22 			desc="Enable or disable the consolidated buff collapsing",
 | 
| 
arkanes@57
 | 
    23 			type="toggle",
 | 
| 
arkanes@57
 | 
    24 			set=function(info, val) kbf:setConsolidatedBuffs(info, val) end,
 | 
| 
arkanes@57
 | 
    25 			get=function(info) return kbf.db.profile.consolidateBuffs end
 | 
| 
arkanes@57
 | 
    26 		}
 | 
| 
arkanes@57
 | 
    27 	}
 | 
| 
arkanes@57
 | 
    28 }
 | 
| 
arkanes@57
 | 
    29 
 | 
| 
arkanes@57
 | 
    30 function kbf:setConsolidatedBuffs(info, val)
 | 
| 
arkanes@57
 | 
    31 	self.db.profile.consolidateBuffs = val
 | 
| 
arkanes@57
 | 
    32 	local attr = val and "99" or nil
 | 
| 
arkanes@57
 | 
    33 	self.secureHeader:SetAttribute("consolidateTo", attr)
 | 
| 
arkanes@57
 | 
    34 	self.dirty = true -- need a rescan
 | 
| 
arkanes@57
 | 
    35 end |