View Single Post
04-13-24, 02:28 AM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,334
Originally Posted by rughar View Post
Hello.

I wonder if I can have a function which set some unit (eg. raid1) or UnitGUID as my mouseover unit without actually move my mouse over the unit. I would like to put this function into "OnEnter" script for some frame and drop the mousever at "OnLeave".

I believe that pretty much same thing is achieved by addons like Grid. When you move your mouse over a frame, it acts like you actually move your mouse over that unit. I tried to dig this functionality from the Grid2 code without success. Can anyone help me with this please?
Pretty much anything that inherits from SecureUnitButtonTemplate will do this automatically, including the DefaultUI. There appears to be some special C-side code that will detect if a mouse is over a frame inheriting this template and attach mouseover to its unit. There's no documentation on this, it's simply an observed effect. Much like how SecureActionButtonTemplate triggers subtle player highlighting when you activate the self-cast modifier while hovering over it.
__________________
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)
  Reply With Quote