Author Topic: How can i check if the button is pressed ( with no release yet );  (Read 3214 times)

Sahkan

  • Jr. Member
  • **
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 74
    • View Profile
I want to make the label on this button to go a little bit down when ever i press it. But i can activate a function only after i finish the click.

For now i use Update function to check the sprite for it's state, but there is got to be a better way.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How can i check if the button is pressed ( with no release yet );
« Reply #1 on: July 02, 2014, 03:24:54 AM »
Why is that? OnPress(bool isPressed) is sent out by NGUI to let you know when something is pressed or unpressed. You can do what you want inside.