Thread Tools Display Modes
11-07-16, 07:36 AM   #1
Yeah
A Kobold Labourer
Join Date: Nov 2016
Posts: 1
How to hide only the tooltips of players?

hey there!
I'm having a problem with tooltips. My intention is to hide the mouseover-tooltip for other players / creatures / npcs that is by default showen in the right bottom corner (see attachment called "tooltip")

Lua Code:
  1. GameTooltip.Show = function()
  2.             GameTooltip:Hide()
  3.         end
  4. GameTooltip:SetScript("OnShow", GameTooltip.Show)

This works fine so far. But if I try to reshow the tooltips there are some problems. With

Lua Code:
  1. GameTooltip:SetScript("OnShow", nil)

the tooltip for the players / creatures / npcs is showen again, gut the itemtooltips (see attachment called "Itemtooltip") are not! And I've no idea how to fix this. Reloading the UI is no option!

So I'm desperately looking for a way to hide only the playertooltip in the right bottom corner OR to reshow all the tooltips including the itemtooltips without having to reload the UI.

Someone here with an good idea? Thanks so much...
Attached Thumbnails
Click image for larger version

Name:	ToolTip.png
Views:	144
Size:	18.0 KB
ID:	8871  Click image for larger version

Name:	Itemtooltip.png
Views:	161
Size:	91.7 KB
ID:	8872  
  Reply With Quote
11-07-16, 02:43 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,324
This should get rid of any random units that are moused over. If the unit is targetted, in your party/raid, or belongs to you, it'll still show.
Code:
GameTooltip:SetScript("OnTooltipSetUnit",function(self) if select(2,self:GetUnit())=="mouseover" then self:Hide(); end end);


If you want a more aggressive approach and hide all units, this should do the trick.
Code:
GameTooltip:SetScript("OnTooltipSetUnit",function(self) self:Hide(); end);
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 11-07-16 at 02:48 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » How to hide only the tooltips of players?


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