Jump to content

GUI - left / right click possible?


lihis
 Share

Recommended Posts

Hello,

With C2D i've used action managers left pick trigger for drag / click stuff and right pick trigger to make context menus, is there a way to enable right click on Babylon GUI elements?

I can only find the pointer down / up events. <_<

Thanky hanky.

Link to comment
Share on other sites

Yes i suppose.

Action manager has:

BABYLON.ActionManager.OnPickTrigger:

BABYLON.ActionManager.OnLeftPickTrigger:

BABYLON.ActionManager.OnRightPickTrigger:

and i use the left and right pick triggers, not the first one that triggers on both.

Link to comment
Share on other sites

@lihis -

If you're going to use right mouse events to trigger 'something', your browser will pop up the default context menu for each specific browser; which makes right mouse events annoying at best. However, you can disable the browser's default context menu by returning "false" in the event handler when capturing the onContextMenu event.

Example:

<body oncontextmenu="return false;">

If this is something you're already aware of, great. However, it's good for others to know as most Devs don't use right mouse events due to the various browser's displaying the context menu by default.

DB

Link to comment
Share on other sites

Ah, yes, nice tips.

I had indeed already done something very similar as it was annoying having that pesky browser context menu popping up!

Thankfully it was a problem easily solved with the help of google and copy paste. :lol:

Probably used right click for that... :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...