Mercurial > wow > reaction
view LDB.lua @ 104:4bc50350f405
- Added LDB support
- Updated readme
- Pulled in LibStub and CallbackHandler instead of external
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Fri, 07 Nov 2008 23:55:33 +0000 |
parents | |
children |
line wrap: on
line source
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, } )