Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: VapapeurTeam on March 14, 2013, 07:57:44 AM
-
Hello,
It's probably a very stupid question, but I haven't figured out how to do that. I've got a UICheckbox on a game object, and the box can be checked/unchecked by clicking on it. It works with both right and left click, and I only want it to be on left clicks (right clicks would do nothing). How can I set that up ?
Thanks.
-
Inside your event functions you can always figure out who sent the event (UICamera.currentCamera), RaycastHit that resulted in this event (UICamera.lastHit), as well as the on-screen position of the touch or mouse (UICamera.lastTouchPosition). You can also determine the ID of the touch event (UICamera.currentTouchID), which is ‘-1′ for the left mouse button, ‘-2′ for right, and ‘-3′ for middle.
http://www.tasharen.com/?page_id=160
-
Yes, but that doesn't help me in this case. I have a completely standard checkbox made of 100% NGUI scripts, which I don't want to modify, and this checkbox can be checked/unchecked by right clicks. I would like to disable right clicks on my checkboxes, without having to change the code of UICheckbox to test for left/right clicks.
-
Any ideas ?
Thanks in advance.
-
You can't do it without modifying NGUI's code.
-
Ok, thanks. I must say I'm a bit surprised this isn't something that NGUI can handle, it seems like a pretty basic feature. Do you plan to adress this issue in a later release ?