Mercurial > wow > reaction
diff classes/ReAction.lua @ 10:f3a7bfebc283
Version 0.33
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Tue, 20 Mar 2007 21:37:38 +0000 |
parents | c05fd3e18b4f |
children | 90bf38d48efd |
line wrap: on
line diff
--- a/classes/ReAction.lua Tue Mar 20 21:35:57 2007 +0000 +++ b/classes/ReAction.lua Tue Mar 20 21:37:38 2007 +0000 @@ -7,8 +7,6 @@ -- ReAction implements the ReBar.IButton interface. It is designed to be used with ReBar -- for grouping and laying out buttons. -- --- ReAction supports the ReBound keybinding interface (only). --- -- Each instance of a ReAction-derived object is associated with a single action -- button frame, which may or may not have a one-to-one mapping with actionID. -- @@ -77,7 +75,7 @@ GetActionFrame = "function", -- f = GetActionFrame(), return a frame derived from SecureActionButtonTemplate (note: this is inherited unimplemented from ReBar.IButton) GetBaseButtonSize = "function", -- sz = GetBaseButtonSize(), return size in pixels of the nominal button (square) DisplayID = "function", -- DisplayID(show), true/false to show/hide the action ID (or equivalent) - DisplayHotkey = "function", -- DisplayHotkey(keyText), set the hotkey display text + DisplayHotkey = "function", -- DisplayHotkey(keyText, button), set the hotkey display text. 2nd argument specifies which button the hotkey is for, default is "LeftButton". } @@ -292,14 +290,14 @@ -- Event handlers function ReAction.prototype:UPDATE_BINDINGS() - self:DisplayHotkey(self:GetKeyBindingText(nil, true)) + self:DisplayHotkey(self:GetKeyBindingText("LeftButton", true),"LeftButton") + self:DisplayHotkey(self:GetKeyBindingText("RightButton",true),"RightButton") end -- Internal functions function ReAction.prototype:Recycle() - --self:SetKeyBinding(nil) -- TODO: only if we're using override bindings self:UnregisterAllEvents() -- tuck the frame away @@ -329,13 +327,10 @@ function ReAction.prototype:SetKeyBinding( k, mouseBtn ) if k == nil or kbValidate(k) then local current = self:GetKeyBinding(mouseBtn) - -- !!!TODO: do we need this? - -- ClearOverrideBindings(self:GetActionFrame()) if current then SetBinding(current,nil) end if k then - -- TODO: use OverrideBinding and store the keybinding in the profile. SetBindingClick(k, self:GetActionFrame():GetName(), mouseBtn or "LeftButton") end end