comparison State.lua @ 91:c2504a8b996c

Bug fixes - action buttons resetting to 6 pixels - stray prints - config panels for action buttons not showing all panels - fixed multi-ID typo - fixed autocast model on pet buttons
author Flick <flickerstreak@gmail.com>
date Fri, 17 Oct 2008 03:59:55 +0000
parents 7cabc8ac6c16
children 5f1d7a81317c
comparison
equal deleted inserted replaced
90:7cabc8ac6c16 91:c2504a8b996c
104 ]] 104 ]]
105 105
106 local onStateHandler = 106 local onStateHandler =
107 -- function _onstate-reaction( self, stateid, newstate ) 107 -- function _onstate-reaction( self, stateid, newstate )
108 [[ 108 [[
109 print("received state",newstate,"on bar",self:GetName())
110 set_state = newstate or set_state 109 set_state = newstate or set_state
111 110
112 local oldState = state 111 local oldState = state
113 state = state_override or set_state or state 112 state = state_override or set_state or state
114 113
115 for i = 1, #propfuncs do 114 for i = 1, #propfuncs do
116 print("running state func",propfuncs[i])
117 control:RunAttribute("func-"..propfuncs[i]) 115 control:RunAttribute("func-"..propfuncs[i])
118 end 116 end
119 117
120 if anchorEnable and anchorEnable[state] ~= anchorstate then 118 if anchorEnable and anchorEnable[state] ~= anchorstate then
121 anchorstate = anchorEnable[state] 119 anchorstate = anchorEnable[state]
375 RefreshState(bar) 373 RefreshState(bar)
376 end 374 end
377 375
378 function RegisterProperty( propname, snippet ) 376 function RegisterProperty( propname, snippet )
379 properties[propname] = snippet or true 377 properties[propname] = snippet or true
380 print("registered property",propname)
381 for _, bar in ReAction:IterateBars() do 378 for _, bar in ReAction:IterateBars() do
382 local states = tfetch(module.db.profile.bars, bar:GetName(), "states") 379 local states = tfetch(module.db.profile.bars, bar:GetName(), "states")
383 if states then 380 if states then
384 for name, s in pairs(states) do 381 for name, s in pairs(states) do
385 SetHandlerData(bar, propname, s[propname], name) 382 SetHandlerData(bar, propname, s[propname], name)