Author Topic: Checking if input down on button  (Read 3473 times)

turkeypotpie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Checking if input down on button
« on: June 26, 2014, 02:20:23 PM »
My game has a feature where I move a button's position across the screen.  Sometimes the button will slide under the user's finger, which is already down on the screen before the movement.  I'd like a way of detecting whether the button is under the user's finger.

Normally you can do the detection with an event, but the event only fires when the finger is depressed, and not when a button is moved under an already depressed finger.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Checking if input down on button
« Reply #1 on: June 27, 2014, 12:36:32 PM »
You get OnDragOver / OnDragOut notifications from dragging. Have you looked into those?

turkeypotpie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: Checking if input down on button
« Reply #2 on: June 28, 2014, 12:47:10 AM »
That did the trick.  Thank you :)