Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: DarkMagicCK on July 01, 2014, 04:49:08 AM

Title: How to make virtual gamepad-liked event system?
Post by: DarkMagicCK on July 01, 2014, 04:49:08 AM
Think about a virtual four arrows gamepad on iphone, when users use this to control the characters to move.
They do not want to release their fingers, but just scroll on their screens.

But the OnPress or OnDrag event can not suit for this, while they all require users to release fingers to trigger OnPress(false) or OnDragEnd, or other buttons will not receive any event.
I know I can get the position of the touch, and check which button is there, but in such case the NGUI event make no sense.
Is there any way to do this within NGUI event system?
Title: Re: How to make virtual gamepad-liked event system?
Post by: ArenMook on July 02, 2014, 03:18:28 AM
OnDragOver, OnDragOut. The button component actually supports highlighting this way via an option on the button script.