Mercurial > wow > reaction
comparison ReAction.lua @ 90:7cabc8ac6c16
Updates for wow 3.0
- TOC update
- updated changed APIs/frame names
- rewrote state code per new SecureHandlers API
- cleaned up Bar, ActionButton code
- removed AceLibrary/Dewdrop, menu from bar right-click
- fixed various small bugs
Updated WowAce external locations
Updated README.html
| author | Flick <flickerstreak@gmail.com> |
|---|---|
| date | Wed, 15 Oct 2008 16:29:41 +0000 |
| parents | fc83b3f5b322 |
| children | c2504a8b996c |
comparison
equal
deleted
inserted
replaced
| 89:491a6ffe7260 | 90:7cabc8ac6c16 |
|---|---|
| 5 - modules (via AceAddon) | 5 - modules (via AceAddon) |
| 6 - bars | 6 - bars |
| 7 - options | 7 - options |
| 8 - bar-type constructors | 8 - bar-type constructors |
| 9 | 9 |
| 10 and publishes events when those collections change. It also implements a single property, 'config mode', | 10 and publishes events when those collections change. It also implements a couple properties |
| 11 and has a couple convenience methods which drill down to particular modules. | 11 and has a couple convenience methods which drill down to particular modules. |
| 12 | 12 |
| 13 Most of the "real work" of the addon happens in Bar.lua and the various modules. | 13 Most of the "real work" of the addon happens in Bar.lua, Overlay.lua, State.lua, and the various modules. |
| 14 | 14 |
| 15 Events (with handler arguments): | 15 Events (with handler arguments): |
| 16 -------------------------------- | 16 -------------------------------- |
| 17 "OnCreateBar" (bar, name) : after a bar object is created | 17 "OnCreateBar" (bar, name) : after a bar object is created |
| 18 "OnDestroyBar" (bar, name) : before a bar object is destroyed | 18 "OnDestroyBar" (bar, name) : before a bar object is destroyed |
| 224 profile = { | 224 profile = { |
| 225 bars = { }, | 225 bars = { }, |
| 226 defaultBar = { } | 226 defaultBar = { } |
| 227 } | 227 } |
| 228 } | 228 } |
| 229 -- default profile is character-specific | 229 -- initial profile is character-specific |
| 230 ) | 230 ) |
| 231 self.db.RegisterCallback(self,"OnProfileChanged") | 231 self.db.RegisterCallback(self,"OnProfileChanged") |
| 232 self.db.RegisterCallback(self,"OnProfileReset","OnProfileChanged") | 232 self.db.RegisterCallback(self,"OnProfileReset","OnProfileChanged") |
| 233 | 233 |
| 234 KB.RegisterCallback(self,"LIBKEYBOUND_ENABLED") | 234 KB.RegisterCallback(self,"LIBKEYBOUND_ENABLED") |
| 345 | 345 |
| 346 function ReAction:GetBar(name) | 346 function ReAction:GetBar(name) |
| 347 return bars[name] | 347 return bars[name] |
| 348 end | 348 end |
| 349 | 349 |
| 350 -- returns pairs of name, bar | |
| 350 function ReAction:IterateBars() | 351 function ReAction:IterateBars() |
| 351 return pairs(bars) | 352 return pairs(bars) |
| 352 end | 353 end |
| 353 | 354 |
| 354 function ReAction:RenameBar(x, newname) | 355 function ReAction:RenameBar(x, newname) |
| 457 success, r = pcall(module[func], module, bar) | 458 success, r = pcall(module[func], module, bar) |
| 458 else | 459 else |
| 459 success, r = pcall(func, bar) | 460 success, r = pcall(func, bar) |
| 460 end | 461 end |
| 461 if success then | 462 if success then |
| 462 opts[module:GetName()] = { [module:GetName()] = r } | 463 if r then |
| 464 opts[module:GetName()] = { [module:GetName()] = r } | |
| 465 end | |
| 463 else | 466 else |
| 464 geterrorhandler()(r) | 467 geterrorhandler()(r) |
| 465 end | 468 end |
| 466 end | 469 end |
| 467 return opts | 470 return opts |
