Thread Tools Display Modes
04-11-24, 09:02 AM   #1
rughar
A Kobold Labourer
Join Date: Apr 2024
Posts: 1
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?
  Reply With Quote
04-11-24, 10:40 AM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,950
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.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
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,331
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

WoWInterface » Developer Discussions » Lua/XML Help » Is there way to force what is within onmouseover?

Thread Tools
Display Modes

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