I wanted to create a control panel frame that is displayed when the mouse is moved over into a certain frame.
This part works fine.
So, I obviously need to hide the frame again, when the mouse is moved out of the frame.
I create a number of texture frames on the newly displayed frame, which all display fine.
My problem comes when the mouse is moved to one of these texture frames, in order to click it, to activate its function.
Moving onto a frame that is entirely within my displayed frame triggers the MouseOut event, which causes me to hide the frame - before the control icon can be clicked.
I tried creating another frame with a higher layer level, and using this to determine if the mouse has moved away from my target area.
No luck.
I tried playing with frame:SetMouseMasking(), but that didnt work either.
I have a workaround now, where I also catch MouseOut events on all my texture frames as well as my control panel frame - and check the mouse X,Y coordinates manually against the coordinates of the bounding box, and then hide it if it has moved away.
But this seems a bit of overkill, so I'm wondering have I actually missed something, or is this the only way to do what I want to do?



Reply With Quote


Bookmarks