Mercurial > wow > reaction
comparison modules/ReAction_ConfigUI/ReAction_ConfigUI.lua @ 61:2ee41dcd673f
moved UserError from ConfigUI to ReAction
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Tue, 13 May 2008 16:42:03 +0000 |
parents | 44649a10378d |
children | 768be7eb22a0 |
comparison
equal
deleted
inserted
replaced
60:44649a10378d | 61:2ee41dcd673f |
---|---|
44 | 44 |
45 function module:PLAYER_REGEN_DISABLED() | 45 function module:PLAYER_REGEN_DISABLED() |
46 if self.editor then | 46 if self.editor then |
47 self.editor:Hide() | 47 self.editor:Hide() |
48 end | 48 end |
49 end | |
50 | |
51 function module:UserError(msg) | |
52 -- any user errors should be flashed to the UIErrorsFrame | |
53 UIErrorsFrame:AddMessage(msg) | |
54 end | 49 end |
55 | 50 |
56 function module:OpenConfig() | 51 function module:OpenConfig() |
57 InterfaceOptionsFrame_OpenToFrame(configName) | 52 InterfaceOptionsFrame_OpenToFrame(configName) |
58 end | 53 end |
138 end ) | 133 end ) |
139 editor:SetCallback("OnClose", | 134 editor:SetCallback("OnClose", |
140 function() | 135 function() |
141 ReAction:SetConfigMode(false) | 136 ReAction:SetConfigMode(false) |
142 end ) | 137 end ) |
143 AceConfigDialog:SetDefaultSize(editorName, 700, 420) | 138 AceConfigDialog:SetDefaultSize(editorName, 700, 540) |
144 | 139 |
145 | 140 |
146 local options = { | 141 local options = { |
147 type = "group", | 142 type = "group", |
148 name = ("ReAction - %s"):format(L["Bar Editor"]), | 143 name = ("ReAction - %s"):format(L["Bar Editor"]), |
469 end | 464 end |
470 | 465 |
471 | 466 |
472 function module:LaunchBarEditor(bar) | 467 function module:LaunchBarEditor(bar) |
473 if InCombatLockdown() then | 468 if InCombatLockdown() then |
474 self:UserError(L["ReAction config mode disabled during combat."]) | 469 ReAction:UserError(L["ReAction config mode disabled during combat."]) |
475 else | 470 else |
476 if not self.editor then | 471 if not self.editor then |
477 self.editor = NewEditor() | 472 self.editor = NewEditor() |
478 end | 473 end |
479 self.editor:Open() | 474 self.editor:Open() |