Mercurial > wow > reaction
comparison modules/LDB.lua @ 109:410d036c43b2
- reorganize modularity file structure (part 1)
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Thu, 08 Jan 2009 00:57:27 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
108:b2fb8f7dc780 | 109:410d036c43b2 |
---|---|
1 local ReAction = ReAction | |
2 local L = ReAction.L | |
3 local format = string.format | |
4 | |
5 -- Export ReAction launcher to LibDataBroker-aware displays | |
6 LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject( "ReAction", | |
7 { | |
8 type = "launcher", | |
9 icon = "Interface\\Icons\\INV_Qiraj_JewelEncased", | |
10 | |
11 OnClick = function( frame, button ) | |
12 if not InCombatLockdown() then | |
13 if IsAltKeyDown() then | |
14 ReAction:SetKeybindMode( not ReAction:GetKeybindMode() ) | |
15 elseif IsShiftKeyDown() then | |
16 ReAction:SetConfigMode( not ReAction:GetConfigMode() ) | |
17 elseif button == "RightButton" then | |
18 ReAction:ShowEditor() | |
19 else | |
20 ReAction:ShowConfig() | |
21 end | |
22 else | |
23 ReAction:UserError(L["ReAction: can't configure in combat"]) | |
24 end | |
25 end, | |
26 | |
27 -- this isn't included in the 'launcher' type LDB spec but it seems all launcher displays use it | |
28 OnTooltipShow = function( tooltip ) | |
29 tooltip:AddLine(format("|cffffffff%s|r %s",L["Click"],L["for global configuration"])) | |
30 tooltip:AddLine(format("|cffffd200%s|r %s",L["Right-click"],L["for bar editor dialog"])) | |
31 tooltip:AddLine(format("|cff00ff00%s|r %s",L["Shift-click"],L["to unlock bars"])) | |
32 tooltip:AddLine(format("|cff00cccc%s|r %s",L["Alt-click"],L["for keybind mode"])) | |
33 end, | |
34 | |
35 } | |
36 ) |