Author Topic: OnPress event: detecting hovered object changes  (Read 2250 times)

0xbdf

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
OnPress event: detecting hovered object changes
« on: December 08, 2013, 05:16:53 PM »
I have a grid of tiles for a board game, and I'm using OnPress to detect FingerDown and FingerUp events on the tiles.

I want to be able to detect when the player does FingerDown on one tile, slides over to another, and does FingerUp there.

What's happening is that if the player does Down->slide->Up, then the OnPress for Down and Up are both called on the same object, but I want the object that the player's finger was over when they released their finger to be the one on which the OnPress event is triggered.

Any advice on how to architect this?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: OnPress event: detecting hovered object changes
« Reply #1 on: December 08, 2013, 05:48:29 PM »
Look at OnDragXXX series of notifications: http://www.tasharen.com/forum/index.php?topic=6711.0