Mercurial > wow > reaction
comparison State.lua @ 92:5f1d7a81317c
- Various bugfixes
- Switched action bar paging/mc fully to the _childupdate method
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Fri, 17 Oct 2008 22:43:57 +0000 |
parents | c2504a8b996c |
children | 168cae4aa8bd |
comparison
equal
deleted
inserted
replaced
91:c2504a8b996c | 92:5f1d7a81317c |
---|---|
86 anchorY = true, | 86 anchorY = true, |
87 enableScale = true, | 87 enableScale = true, |
88 scale = true, | 88 scale = true, |
89 } | 89 } |
90 | 90 |
91 local weak = { __mode = "k" } | |
92 local statedrivers = setmetatable( { }, weak ) | |
93 local keybinds = setmetatable( { }, weak ) | |
91 | 94 |
92 -- | 95 -- |
93 -- Secure Handler Snippets | 96 -- Secure Handler Snippets |
94 -- | 97 -- |
95 local SetHandlerData, SetStateDriver, SetStateKeybind, RefreshState | 98 local SetHandlerData, SetStateDriver, SetStateKeybind, RefreshState |
141 state_override = nil -- toggle | 144 state_override = nil -- toggle |
142 else | 145 else |
143 state_override = button | 146 state_override = button |
144 end | 147 end |
145 ]] .. onStateHandler | 148 ]] .. onStateHandler |
146 | |
147 local weak = { __mode = "k" } | |
148 local statedrivers = setmetatable( { }, weak ) | |
149 local keybinds = setmetatable( { }, weak ) | |
150 | 149 |
151 -- Construct a lua assignment as a code string and execute it within the header | 150 -- Construct a lua assignment as a code string and execute it within the header |
152 -- frame's sandbox. 'value' must be a string, boolean, number, or nil. If called | 151 -- frame's sandbox. 'value' must be a string, boolean, number, or nil. If called |
153 -- with four arguments, then it treats 'varname' as an existing global table and | 152 -- with four arguments, then it treats 'varname' as an existing global table and |
154 -- sets a key-value pair. For a slight efficiency boost, pass the values in as | 153 -- sets a key-value pair. For a slight efficiency boost, pass the values in as |
413 function CleanupStates( bar ) | 412 function CleanupStates( bar ) |
414 SetStateDriver(bar, nil) | 413 SetStateDriver(bar, nil) |
415 end | 414 end |
416 | 415 |
417 function ShowAll( bar, show ) | 416 function ShowAll( bar, show ) |
418 SetHandlerData(bar, "showAll", show) | 417 if statedrivers[bar] then |
419 RefreshState(bar) | 418 SetHandlerData(bar, "showAll", show) |
419 RefreshState(bar) | |
420 end | |
420 end | 421 end |
421 end | 422 end |
422 | 423 |
423 | 424 |
424 | 425 |