# HG changeset patch # User Flick # Date 1226102133 0 # Node ID 4bc50350f405ae6a6af3de4349d3e5f1e8205ee1 # Parent 890e4c4ab143b247dd6d375dff16fb2ee7d54590 - Added LDB support - Updated readme - Pulled in LibStub and CallbackHandler instead of external diff -r 890e4c4ab143 -r 4bc50350f405 LDB.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LDB.lua Fri Nov 07 23:55:33 2008 +0000 @@ -0,0 +1,36 @@ +local ReAction = ReAction +local L = ReAction.L +local format = string.format + +-- 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, + + } +) diff -r 890e4c4ab143 -r 4bc50350f405 ReAction.xml --- a/ReAction.xml Thu Nov 06 01:28:07 2008 +0000 +++ b/ReAction.xml Fri Nov 07 23:55:33 2008 +0000 @@ -9,6 +9,7 @@