PDA

View Full Version : Overriding or augmenting the onRIGHTClick() function for radial menus



Minty23185Fresh
January 31st, 2018, 18:01
Of course there is no onRIGHTClick() function, so let me just get that out of the way!

The <windowcontrol> page of XML and Scripting Reference Document (https://www.fantasygrounds.com/refdoc/) specifically states that the right mouse button click event is reserved for use with radial menus. I would like to add a bit of functionality before the radial menu is invoked. Is this possible? Can I intercept a right click?

My investigations indicate that it might not be possible. If I add an onClickDown() and/or an onClickRelease() function to my control, they are executed just fine for mouse clicks other that a right click.

(Often I am told I am wrong here in the forums, I sure hope that's the case this time!)

Thanks in advance for your help.

Moon Wizard
January 31st, 2018, 19:59
There’s no mechanism to do that now, so it would be a request that I would have to evaluate for how it fits into the API, relative priority, and whether it impacts any other parts negatively. I think this one will need to go on the wish list.

Regards,
JPG

Minty23185Fresh
January 31st, 2018, 20:19
Aargh. I'm right for once and it negatively impacts me. Go figure.

The timing won't be quite right, but I think I can do what I need to in onMenuSelection(). A combo box dropdown list remains visible when the user right clicks. I need to setFocus() somewhere else so that it becomes invisible. If the user closes the menu without selection and the dropdown remains visible, I'm okay with that.

Thanks Moon Wizard for your assistance.

22062

[EDIT] Yep, a setFocus() to the list, first thing, in onMenuSelection() is acceptable, not perfect, but acceptable.