Thread Tools Display Modes
10-21-10, 10:08 AM   #1
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Taking over a bliz tooltip.

Okay so what im trying to do is take the tooltip off of the FriendsMicroButton and have it show on my own frame. Is there a way to do this or do i need to redo the tooltip? can the OnEnter of a bliz frame be used as a function? IE can on have my frames on enter script run the FriendsMicroButton on enter script? or maybe a GetScript?
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
10-21-10, 02:31 PM   #2
Xubera
A Cobalt Mageweaver
 
Xubera's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 207
FriendsMicroButton:HookScript("OnEnter", function()
GameTooltip:SetAnchor(myFrame, tooltipAnchor)
end)


untested but you get the jist.

if you add a line, just call GameTooltip:Show() and it will readjust its size.


if you want it to show on your frame when you mouse over your frame, then you have to write it on its own.

in one of my addons, i did it as so...

Code:
GameTooltip:ClearLines()
GameTooltip:SetOwner(Battlemaster.frame, "ANCHOR_NONE")
GameTooltip:ClearAllPoints()
GameTooltip:SetPoint("TOPLEFT", Battlemaster.frame, "TOPRIGHT")
GameTooltip:AddDoubleLine()
GameTooltip:AddDoubleLine()
GameTooltip:AddDoubleLine()
GameTooltip:Show()
though i think :SetOwner() goes ahead and clears the lines, but you MUST use SetOwner( as i recall), i just didnt like the preset anchors, so i cleared the points and set it myself
__________________
Chat Consolidate is the solution to any out of control trade chat. Ignore lines, throttle chat, consolidate posts!Follow the link to find out how!

▲ ▲ WoWInterface wont let me triforce >.>
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Taking over a bliz tooltip.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off