Databroker Hover
Rootkit- opened this issue ยท 0 comments
DataBrocker
local DataBrocker=false
function Tool.AddDataBrocker(icon,onClick,onTooltipShow,text)
if LibStub ~= nil and DataBrocker ~= true then
local Launcher = LibStub('LibDataBroker-1.1',true)
if Launcher ~= nil then
DataBrocker=true
Launcher:NewDataObject(TOCNAME, {
type = "launcher",
icon = icon,
OnClick = onClick,
OnTooltipShow = onTooltipShow,
tocname = TOCNAME,
label = text or GetAddOnMetadata(TOCNAME, "Title"),
OnEnter= function(self)
point, relativeTo, relativePoint, xOfs, yOfs = GroupBulletinBoardFrame:GetPoint()
GroupBulletinBoardFrame:Show()
local sad = GroupBulletinBoardFrame:GetWidth() / 2
local xpos, ypos = GetCursorPosition()
local scale = UIParent:GetEffectiveScale()
GroupBulletinBoardFrame:ClearAllPoints()
GroupBulletinBoardFrame:SetFrameLevel(self:GetFrameLevel()+100)
GroupBulletinBoardFrame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", (xpos / scale) -sad, (ypos / scale) -15)
end,
OnLeave= function(self)
GroupBulletinBoardFrame:ClearAllPoints()
GroupBulletinBoardFrame:SetPoint(point, relativeTo, relativePoint, xOfs, yOfs)
GroupBulletinBoardFrame:Hide()
end,
})
end
end
end