Thanks
It's working, but... how to add tooltip info onmouseover?
Update: did it! By adding:
xml scripts:
Code:
<Scripts>
<OnLoad>
this:RegisterForClicks("LeftButtonUp","RightButtonUp")
this:RegisterForDrag("LeftButton","RightButton")
</OnLoad>
<OnEnter>
if (not self.dragging) then
PS_MinimapButton_OnEnter(self)
end
</OnEnter>
<OnLeave>
GameTooltip:Hide()
</OnLeave>
<OnDragStart>
self.dragging = true
GameTooltip:Hide()
this:LockHighlight()
PS_MinimapButton_DraggingFrame:Show()
</OnDragStart>
<OnDragStop>
self.dragging = false
this:UnlockHighlight()
PS_MinimapButton_DraggingFrame:Hide()
</OnDragStop>
<OnClick>
PS_MinimapButton_OnClick() -- do your thing in here, arg1 is mouse button clicked
</OnClick>
</Scripts>
LUA:
Code:
function PS_MinimapButton_OnEnter(self)
if (self.dragging) then
return
end
GameTooltip:SetOwner(self or UIParent, "ANCHOR_LEFT")
PS_MinimapButton_Details(GameTooltip)
end
function PS_MinimapButton_Details(tt, ldb)
tt:SetText("PhoenixStyle")
end