Mercurial > wow > reaction
diff modules/ReAction_ConfigUI/ReAction_ConfigUI.lua @ 58:20003239af0b
changed "layout editor" to "bar editor"
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Mon, 28 Apr 2008 21:08:35 +0000 |
parents | 7e09c02ae620 |
children | 7430a8dd4e90 |
line wrap: on
line diff
--- a/modules/ReAction_ConfigUI/ReAction_ConfigUI.lua Fri Apr 25 23:42:33 2008 +0000 +++ b/modules/ReAction_ConfigUI/ReAction_ConfigUI.lua Mon Apr 28 21:08:35 2008 +0000 @@ -63,7 +63,7 @@ function module:OnOptionsRefreshed(evt) AceConfigReg:NotifyChange("ReAction") - AceConfigReg:NotifyChange("ReAction-Layout") + AceConfigReg:NotifyChange("ReAction-Editor") end function module:OnCreateBar(evt, bar) @@ -75,9 +75,9 @@ repeat key = ("bar%s"):format(i) i = i+1 - until self.layoutOpts.args[key] == nil + until self.editorOpts.args[key] == nil self.barOptMap[name] = key - self.layoutOpts.args[key] = { + self.editorOpts.args[key] = { type = "group", name = name, childGroups = "tab", @@ -179,8 +179,8 @@ local key = self.barOptMap[name] self.barOptMap[name] = nil if key then - self.layoutOpts.args[key] = nil - self:RefreshLayoutEditor() + self.editorOpts.args[key] = nil + self:RefreshBarEditor() end end @@ -188,8 +188,8 @@ local key = self.barOptMap[oldname] self.barOptMap[oldname], self.barOptMap[newname] = nil, key if key then - self.layoutOpts.args[key].name = newname - self:RefreshLayoutEditor() + self.editorOpts.args[key].name = newname + self:RefreshBarEditor() end end @@ -208,13 +208,13 @@ InterfaceOptionsFrame_OpenToFrame("ReAction") end -function module:LaunchLayoutEditor(bar) +function module:LaunchBarEditor(bar) if InCombatLockdown() then self:UserError(L["ReAction config mode disabled during combat."]) else if not self.editor then -- use a local container to work around AceConfigDialog closing - -- both the layout editor and the global options when interface options is closed + -- both the bar editor and the global options when interface options is closed local ed = LibStub("AceGUI-3.0"):Create("Frame") ed.frame:SetClampedToScreen(true) local old_OnUpdate = ed.frame:GetScript("OnUpdate") @@ -237,18 +237,18 @@ ReAction:SetConfigMode(false) end ) self.editor = ed - AceConfigDialog:SetDefaultSize("ReAction-Layout", 640, 420) + AceConfigDialog:SetDefaultSize("ReAction-Editor", 640, 420) end - AceConfigDialog:Open("ReAction-Layout", self.editor) + AceConfigDialog:Open("ReAction-Editor", self.editor) ReAction:SetConfigMode(true) end end -function module:RefreshLayoutEditor() - AceConfigReg:NotifyChange("ReAction-Layout") +function module:RefreshBarEditor() + AceConfigReg:NotifyChange("ReAction-Editor") if self.editor and self.editor.frame:IsShown() then - AceConfigDialog:Open("ReAction-Layout", self.editor) + AceConfigDialog:Open("ReAction-Editor", self.editor) end end @@ -283,13 +283,13 @@ name = L["Customizable replacement for Blizzard's Action Bars"], order = 1, }, - _launchLayout = { + _launchEditor = { type = "execute", handler = self, - name = L["Layout Editor..."], - desc = L["Show the ReAction Layout Editor to edit your bars"], + name = L["Edit Bars..."], + desc = L["Show the ReAction Bar Editor dialogue"], func = function() - self:LaunchLayoutEditor() + self:LaunchBarEditor() -- you can't close a dialog in response to an options click, because the end of the -- handler for all the button events calls lib:Open() -- So, schedule a close on the next OnUpdate @@ -302,7 +302,7 @@ _closeThis = { type = "toggle", name = L["Close on Launch"], - desc = L["Close the Interface Options window when launching the ReAction Layout Editor"], + desc = L["Close the Interface Options window when launching the ReAction Bar Editor"], get = function() return self.db.profile.closeOnLaunch end, set = function(info, val) self.db.profile.closeOnLaunch = val end, order = 3, @@ -363,10 +363,10 @@ }, }) - -- layout editor options - local layoutOpts = { + -- bar editor options + local editorOpts = { type = "group", - name = ("ReAction - %s"):format(L["Layout"]), + name = ("ReAction - %s"):format(L["Bar Editor"]), handler = self, childGroups = "tree", args = { @@ -393,7 +393,7 @@ closeThis = { type = "toggle", name = L["Close on Launch"], - desc = L["Close the Layout Editor when opening the ReAction global Interface Options"], + desc = L["Close the Bar Editor when opening the ReAction global Interface Options"], get = function() return self.db.profile.editorCloseOnLaunch end, set = function(info, val) self.db.profile.editorCloseOnLaunch = val end, order = 3, @@ -504,8 +504,8 @@ } } } - self.layoutOpts = layoutOpts + self.editorOpts = editorOpts self.barOptMap = { } - AceConfigReg:RegisterOptionsTable("ReAction-Layout",layoutOpts) + AceConfigReg:RegisterOptionsTable("ReAction-Editor",editorOpts) end