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