flickerstreak@109: local ReAction = ReAction flickerstreak@109: local L = ReAction.L flickerstreak@109: local format = string.format flickerstreak@109: flickerstreak@109: -- Export ReAction launcher to LibDataBroker-aware displays flickerstreak@109: LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject( "ReAction", flickerstreak@109: { flickerstreak@109: type = "launcher", flickerstreak@109: icon = "Interface\\Icons\\INV_Qiraj_JewelEncased", flickerstreak@109: flickerstreak@109: OnClick = function( frame, button ) flickerstreak@109: if not InCombatLockdown() then flickerstreak@109: if IsAltKeyDown() then flickerstreak@109: ReAction:SetKeybindMode( not ReAction:GetKeybindMode() ) flickerstreak@109: elseif IsShiftKeyDown() then flickerstreak@109: ReAction:SetConfigMode( not ReAction:GetConfigMode() ) flickerstreak@109: elseif button == "RightButton" then flickerstreak@109: ReAction:ShowEditor() flickerstreak@109: else flickerstreak@109: ReAction:ShowConfig() flickerstreak@109: end flickerstreak@109: else flickerstreak@109: ReAction:UserError(L["ReAction: can't configure in combat"]) flickerstreak@109: end flickerstreak@109: end, flickerstreak@109: flickerstreak@109: -- this isn't included in the 'launcher' type LDB spec but it seems all launcher displays use it flickerstreak@109: OnTooltipShow = function( tooltip ) flickerstreak@109: tooltip:AddLine(format("|cffffffff%s|r %s",L["Click"],L["for global configuration"])) flickerstreak@109: tooltip:AddLine(format("|cffffd200%s|r %s",L["Right-click"],L["for bar editor dialog"])) flickerstreak@109: tooltip:AddLine(format("|cff00ff00%s|r %s",L["Shift-click"],L["to unlock bars"])) flickerstreak@109: tooltip:AddLine(format("|cff00cccc%s|r %s",L["Alt-click"],L["for keybind mode"])) flickerstreak@109: end, flickerstreak@109: flickerstreak@109: } flickerstreak@109: )