Welcome,
Guest
. Please
login
or
register
.
November 09, 2024, 07:42:27 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Prevent right mouse button from dragging UIDragObject
« previous
next »
Print
Pages: [
1
]
Author
Topic: Prevent right mouse button from dragging UIDragObject (Read 1760 times)
Wumpee
Jr. Member
Thank You
-Given: 3
-Receive: 0
Posts: 53
Prevent right mouse button from dragging UIDragObject
«
on:
November 26, 2014, 03:49:57 PM »
What is the correct way to prevent the right mouse button from dragging an object with a UIDragObject component on it?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Prevent right mouse button from dragging UIDragObject
«
Reply #1 on:
November 26, 2014, 08:42:37 PM »
Modify the script and add a check at the top of its OnPress() function:
if
(
UICamera
.
currentTouchID
!=
-
1
)
return
;
Logged
Wumpee
Jr. Member
Thank You
-Given: 3
-Receive: 0
Posts: 53
Re: Prevent right mouse button from dragging UIDragObject
«
Reply #2 on:
November 26, 2014, 08:56:54 PM »
Thanks, that's what I'm doing now. I just wasn't sure if there was a better way.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Prevent right mouse button from dragging UIDragObject