Author Topic: Stop input when I disable a panel  (Read 3549 times)

beforethelight

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
Stop input when I disable a panel
« on: March 16, 2013, 07:59:14 AM »
So here is the issue I have run just into I use uipanels like different windows gliding them on and off the page as a user activates a certain menu.  I have noticed that if a button is held when I disable a panel that button will be continually held until that panel is active again. Is there a way to stop all inputs from a panel before I set it inactive?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Stop input when I disable a panel
« Reply #1 on: March 16, 2013, 09:19:11 AM »
Assuming you disable in OnPress, just set UICamera.currentTouch.pressed = null.

beforethelight

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: Stop input when I disable a panel
« Reply #2 on: March 17, 2013, 08:02:14 AM »
Thank You!!  But it was my fault I was using on press to set a bool to do something or not to and I just added a on disabled set bool to false but thank you very much for the quick reply it pointed me in the right direction.