WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Letting right-click passthrough on frame (https://www.wowinterface.com/forums/showthread.php?t=59444)

techniqs 01-08-23 09:34 AM

Letting right-click passthrough on frame
 
Hi!
Im trying to modify the current version of sArena (Updated) which are basically better arena frames.
On left-click you can select the target and on right-click you set a focus on the target. What I am trying to achieve is leaving the left-click functionality but letting the right-click passthrough, so I can use my right-click to move the camera even on the frames. I already disabled the focusing via right-click but even after checking code and reading through the widget API documentation I couldnt find a way how to leave mouseEnabled for the frame and at the same time only let *type2 (right-click) passthrough.
What I also tried was to somehow modify the functionality on mouseUp/mouseDown for *type2 but I am not well versed enough in the wow addon development-space to know how I could enable the camera movement.

Side note I also found the method CameraOrSelectOrMoveStart but it is protected/restricted.

Any help is appreciated!
If I should provide more detailed information about anything from the Addon let me know.

EDIT:
I found MouselookStart() and MouselookStop(), problem I have now is if I have MouseLookStart on a mouseDown event for whatever reason on the same click a mouseUp Event will also be triggered. Any ideas?

SDPhantom 01-08-23 06:01 PM

There's also frame:SetPassThroughButtons() if you want to give that a shot. The documentation is lacking, but it looks like something worth investigating.

techniqs 01-08-23 06:25 PM

Quote:

Originally Posted by SDPhantom (Post 341933)
There's also frame:SetPassThroughButtons() if you want to give that a shot. The documentation is lacking, but it looks like something worth investigating.

How could I miss that! Thanks a lot!!
Good old oneliner did the trick:
Code:

self:SetPassThroughButtons("RightButton")
Closed.

Ketho 01-11-23 07:15 AM

Would be great if someone could update the wiki if it's lacking :)

SDPhantom 01-14-23 05:52 AM

My WoWPedia account stopped working when they transferred from Curse to Fandom.


All times are GMT -6. The time now is 10:42 PM.

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