View Full Version : Right click on viewport/canvas
06-06-2011, 08:54 PM
When a user right clicks an object in my game I would like to be able to have a menu come up. Is it possible to override the right click event only for the canvas and still allow normal right click functions outside of the canvas?
document.onmousedown = handleMouseDown;
if ( mouse_pos ) inside gl canvas
true = menu comes up
false = no menu
06-08-2011, 10:49 PM
Thanks zed. Very helpful!
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.