Mercurial > wow > reaction
comparison modules/ReAction_ConfigUI/ReAction_ConfigUI.lua @ 81:57f8151ea0f0
- Fixed some snafus with creating bars
- Added support for opening the bar editor to a particular path
- Creating bars/states now selects the new bar/state in the config editor
- moved Bar:SetStateAttribute() back to working optionally on buttons rather than buttonFrame container
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Wed, 25 Jun 2008 21:07:18 +0000 |
parents | 42ec2938d65a |
children | 1ad208c25618 |
comparison
equal
deleted
inserted
replaced
80:42ec2938d65a | 81:57f8151ea0f0 |
---|---|
282 } | 282 } |
283 } | 283 } |
284 } | 284 } |
285 AceConfigReg:RegisterOptionsTable(editorName, options) | 285 AceConfigReg:RegisterOptionsTable(editorName, options) |
286 | 286 |
287 function editor:Open(bar) | 287 function editor:Open(bar, ...) |
288 if bar then | 288 if bar then |
289 AceConfigDialog:SelectGroup(editorName, barOptMap[bar:GetName()]) | 289 AceConfigDialog:SelectGroup(editorName, barOptMap[bar:GetName()], ...) |
290 end | 290 end |
291 AceConfigDialog:Open(editorName,self) | 291 AceConfigDialog:Open(editorName,self) |
292 end | 292 end |
293 | 293 |
294 function editor:Refresh() | 294 function editor:Refresh() |
465 end | 465 end |
466 | 466 |
467 function editor:CreateBar() | 467 function editor:CreateBar() |
468 if tmp.barName and tmp.barName ~= "" then | 468 if tmp.barName and tmp.barName ~= "" then |
469 ReAction:CreateBar(tmp.barName, tmp.barType or ReAction:GetDefaultBarType(), tmp.barRows, tmp.barCols, tmp.barSize, tmp.barSpacing) | 469 ReAction:CreateBar(tmp.barName, tmp.barType or ReAction:GetDefaultBarType(), tmp.barRows, tmp.barCols, tmp.barSize, tmp.barSpacing) |
470 AceConfigDialog:SelectGroup(editorName, barOptMap[tmp.barName]) | |
470 tmp.barName = nil | 471 tmp.barName = nil |
471 end | 472 end |
472 end | 473 end |
473 | 474 |
474 ReAction.RegisterCallback(editor,"OnCreateBar") | 475 ReAction.RegisterCallback(editor,"OnCreateBar") |
483 | 484 |
484 return editor | 485 return editor |
485 end | 486 end |
486 | 487 |
487 | 488 |
488 function module:LaunchBarEditor(bar) | 489 function module:LaunchBarEditor(bar, ...) |
489 if InCombatLockdown() then | 490 if InCombatLockdown() then |
490 ReAction:UserError(L["ReAction config mode disabled during combat."]) | 491 ReAction:UserError(L["ReAction config mode disabled during combat."]) |
491 else | 492 else |
492 if not self.editor then | 493 if not self.editor then |
493 self.editor = NewEditor() | 494 self.editor = NewEditor() |
494 end | 495 end |
495 self.editor:Open(bar) | 496 self.editor:Open(bar, ...) |
496 ReAction:SetConfigMode(true) | 497 ReAction:SetConfigMode(true) |
497 end | 498 end |
498 end | 499 end |
499 | 500 |