WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Is there way to force what is within onmouseover? (https://www.wowinterface.com/forums/showthread.php?t=59852)

rughar 04-11-24 09:02 AM

Is there way to force what is within onmouseover?
 
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?

Xrystal 04-11-24 10:40 AM

You have to assign which unit ( at creation usually ) is allocated to that cell. And then probably some code to tell the game to show it if that unit exists and hide if not.

The built in mouseover functionality then checks to see if there is a unit linked to the frame and reports that ( I assume this is the case ) .

At least that seems to be the case when I use it in my unit frame code.

SDPhantom 04-13-24 02:28 AM

Quote:

Originally Posted by rughar (Post 343719)
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.


All times are GMT -6. The time now is 02:34 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI