Thread Tools Display Modes
02-11-10, 12:46 PM   #1
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Hiding shoppingtooltip

Hi all!
I've got this situation: I'm hovering over a butting and I'm post-hooking the OnEnter script. So if the user holds shift the ShoppingTooltip gets shown(and already is shown when my function is called). Now if I hide it, it bugs out the next time it shows. So how can I hide this pesky thing?
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote
02-11-10, 09:20 PM   #2
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Code, please?
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
02-11-10, 11:54 PM   #3
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
I got it, I simulate the default behaviour and it works now.

lua Code:
  1. local elapsed = 0
  2. GameTooltip:HookScript("OnUpdate", function(self, e)
  3.     elapsed = elapsed + e
  4.     if elapsed < .2 then return else elapsed = 0 end
  5.     if (not self.comparing and IsModifiedClick("COMPAREITEMS")) then
  6.         GameTooltip_ShowCompareItem(self)
  7.         self.comparing = true
  8.     elseif ( self.comparing and not IsModifiedClick("COMPAREITEMS")) then
  9.         for _, frame in pairs(self.shoppingTooltips) do
  10.             frame:Hide()
  11.         end
  12.         self.comparing = false
  13.     end
  14. end)
  15. hooksecurefunc(GameTooltip, "Hide", function(self) for _, tt in pairs(self.shoppingTooltips) do tt:Hide() end end)
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Hiding shoppingtooltip


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