Mercurial > wow > reaction
diff ReAction.lua @ 122:a2d2f23137c8
- Rearranged and consolidated some files in modules directory
- Added 'classes' directory, moved Bar and Overlay there
- Added Button, ActionButton, and GridProxy classes, not in use yet
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Mon, 23 Feb 2009 18:56:57 +0000 |
parents | fb48811a8736 |
children | 29dacbecdb52 |
line wrap: on
line diff
--- a/ReAction.lua Mon Feb 09 19:02:58 2009 +0000 +++ b/ReAction.lua Mon Feb 23 18:56:57 2009 +0000 @@ -522,3 +522,36 @@ StaticPopup_Show("REACTION_KB_WARN") end end + +-- Export ReAction launcher to LibDataBroker-aware displays +LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject( "ReAction", + { + type = "launcher", + icon = "Interface\\Icons\\INV_Qiraj_JewelEncased", + + OnClick = function( frame, button ) + if not InCombatLockdown() then + if IsAltKeyDown() then + ReAction:SetKeybindMode( not ReAction:GetKeybindMode() ) + elseif IsShiftKeyDown() then + ReAction:SetConfigMode( not ReAction:GetConfigMode() ) + elseif button == "RightButton" then + ReAction:ShowEditor() + else + ReAction:ShowConfig() + end + else + ReAction:UserError(L["ReAction: can't configure in combat"]) + end + end, + + -- this isn't included in the 'launcher' type LDB spec but it seems all launcher displays use it + OnTooltipShow = function( tooltip ) + tooltip:AddLine(format("|cffffffff%s|r %s",L["Click"],L["for global configuration"])) + tooltip:AddLine(format("|cffffd200%s|r %s",L["Right-click"],L["for bar editor dialog"])) + tooltip:AddLine(format("|cff00ff00%s|r %s",L["Shift-click"],L["to unlock bars"])) + tooltip:AddLine(format("|cff00cccc%s|r %s",L["Alt-click"],L["for keybind mode"])) + end, + + } +)