Welcome,
Guest
. Please
login
or
register
.
December 03, 2024, 08:54:46 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
'OnDragFinished' fired on simple tap
« previous
next »
Print
Pages: [
1
]
Author
Topic: 'OnDragFinished' fired on simple tap (Read 2444 times)
Oinobareion
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 14
'OnDragFinished' fired on simple tap
«
on:
November 20, 2013, 03:58:50 AM »
Hi,
I am using the UIDraggablePanel event 'OnDragFinished' to fire events as soon as i have finished dragging the panel. Unfortunately, the event also gets fired when i simply tap the panel ( = when there has been no offset between my touches). How can I fix that?
void
Start
(
)
{
draggablePanel
.
onDragFinished
=
new
UIDraggablePanel
.
OnDragFinished
(
OnDragFinished
)
;
}
void
OnDragFinished
(
)
{
// Do something
}
Thanks for help!
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: 'OnDragFinished' fired on simple tap
«
Reply #1 on:
November 20, 2013, 03:08:22 PM »
You can open UIDraggablePanel script, go to line ~555:
if
(
onDragFinished
!=
null
)
onDragFinished
(
)
;
...and wrap it in an "if" statement:
if
(
!
smoothDragStart
||
mDragStarted
)
{
if
(
onDragFinished
!=
null
)
onDragFinished
(
)
;
}
Logged
Oinobareion
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 14
Re: 'OnDragFinished' fired on simple tap
«
Reply #2 on:
November 21, 2013, 03:12:10 AM »
Thanks, works fine!
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
'OnDragFinished' fired on simple tap