Mercurial > wow > reaction
diff modules/Action.lua @ 147:901c91dc1bf2
Some refactoring of configmode/keybind handlers
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Thu, 07 May 2009 23:55:00 +0000 |
parents | 729232aeeb5e |
children | 8cc187143acd |
line wrap: on
line diff
--- a/modules/Action.lua Thu Apr 30 16:51:43 2009 +0000 +++ b/modules/Action.lua Thu May 07 23:55:00 2009 +0000 @@ -9,9 +9,6 @@ local weak = { __mode="k" } --- libraries -local KB = LibStub("LibKeyBound-1.0") - -- module declaration local moduleID = "Action" local module = ReAction:NewModule( moduleID ) @@ -39,11 +36,6 @@ ReAction.RegisterCallback(self, "OnDestroyBar") ReAction.RegisterCallback(self, "OnEraseBar") ReAction.RegisterCallback(self, "OnRenameBar") - ReAction.RegisterCallback(self, "OnConfigModeChanged") - - KB.RegisterCallback(self, "LIBKEYBOUND_ENABLED") - KB.RegisterCallback(self, "LIBKEYBOUND_DISABLED") - KB.RegisterCallback(self, "LIBKEYBOUND_MODE_COLOR_CHANGED","LIBKEYBOUND_ENABLED") end function module:OnEnable() @@ -99,25 +91,6 @@ b[newname], b[oldname] = b[oldname], nil end -function module:OnConfigModeChanged(event, mode) - for _, h in pairs(self.handles) do - h:SetConfigMode(mode) - end -end - -function module:LIBKEYBOUND_ENABLED(evt) - for _, h in pairs(self.handles) do - h:SetKeybindMode(true) - end -end - -function module:LIBKEYBOUND_DISABLED(evt) - for _, h in pairs(self.handles) do - h:SetKeybindMode(false) - end -end - - ---- Interface ---- function module:GetBarOptions(bar) local h = self.handles[bar] @@ -141,7 +114,7 @@ }, lockButtons = { name = L["Lock Buttons"], - desc = L["Prevents picking up/dragging actions.|nNOTE: This setting is overridden by the global setting in Blizzard's Action Buttons tab"], + desc = L["Prevents picking up/dragging actions (use SHIFT to override this behavior)"], order = 2, type = "toggle", get = "GetLockButtons", @@ -276,7 +249,6 @@ self.config.buttons = { } end self:Refresh() - self:SetKeybindMode(ReAction:GetKeybindMode()) return self end @@ -321,22 +293,10 @@ end end - function Handle:SetConfigMode(mode) - for _, b in pairs(self.btns) do - b:UpdateActionIDLabel(mode) - end - end - function Handle:UpdateButtonLock() Button.SetButtonLock(self.bar, self.config.lockButtons, self.config.lockButtonsCombat) end - function Handle:SetKeybindMode(mode) - for _, b in pairs(self.btns) do - b:SetKeybindMode(mode) - end - end - function Handle:GetLastButton() return self.btns[#self.btns] end