This one nearly killed me.
I was trying to set up a Double Tap or multi-touch and detecting the number of fingers touching the screen. Well this worked fine, I could get it to work. Then what I was after was to detect if a particular sprite on screen was mutli-touched. Which could mean that there could be a touch on each of the sprites and that will register as 2 touches. So I had to set up some internal flags on the number of touches on each of the sprite, however when the touches begin in a particular sprite but end in another one, we do not have a way to identify the same as it would be absolutely unclear as to which touch moved into another sprite and which one ended. So, while I had it working I had to remove that functionality for that one off case where it failed. I did not want to handle setting a touched control that receives all of the events after the first touch. It would be best if it was handled from the internals of Gideros than Lua code.
@Atilim, can you add the Event.TAP and maybe some Gesture events rather than having to write lines of code everytime?
The reason why Event.TOUCHES_BEGIN would not work is that if this event handler was attached to say 5 sprites, then irrespective of which sprite was tapped, all 5 are triggered, then we have to get the touch co-ordinates, get the touch target, do a hitpoint test to determine if the touch was inside of the target or not.
I feel that rather than handling this via code by the user, this should be handled internally by Gideros as this can save unnecessary amounts of redundant code being written and managed by the users.
Do you think this can be incorporated would be easier and faster and saves additional lines of code to handle stuff.
Comments
We can provide an event like Event.TAP (with tapCount property) but you still need to do hitTestPoint check and call stopPropagation() accordingly. Does this solve your problem?
welcome back (Assuming that you are back), hope the trip was fun, would look forward to hearing and seeing all new things in the coming few weeks/months.
Yes what you propose would be helpful. Would it solve the problem, maybe can confirm after using the same.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Likes: hgvyas123, OZApps
It also has on page xxvii, (the publishers missed out on the picture) but have the profile of a wonderful developer and tech reviewer. You must see that page, just Under Patrick Meehan's Picture/Profile. They also missed out on @mhartlef's and Simeon's profile, dunno why the publishers did that. Maybe they did not want many Tech Reviewers.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps