Author Topic: Having issues using onPress with the eventlistner  (Read 2076 times)

MaceikaDev

  • Guest
Having issues using onPress with the eventlistner
« on: April 23, 2013, 03:15:48 PM »
Hey has anyone had trouble with onPress not showing false after a release. I am using touch for the input and using Win7 touch hook from Virtualware.. 
  1.  public void ActivateClick(GameObject sender, bool isDown)
  2.     {
  3.         buttonPressed = isDown;
  4.         for (int i = 0; i < imageButton.Length; i++)
  5.         {
  6.             if (imageButton[i].gameObject == sender && isDown == true)
  7.             {
  8.                 print("Ummmm Pressed");
  9.                
  10.                 imageButton[i].ImageChange();
  11.             }
  12.             else if(imageButton[i].gameObject == sender && isDown == false)
  13.             {
  14.                 print("EEEk button down");
  15.                 imageButton[i].NoImageChg();
  16.                
  17.             }
  18.         }
  19.     }

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Having issues using onPress with the eventlistner
« Reply #1 on: April 23, 2013, 03:38:55 PM »
I can assure you press event works exactly as it had a year and a half ago. No idea about the hook you're using, however.

MaceikaDev

  • Guest
Re: Having issues using onPress with the eventlistner
« Reply #2 on: April 23, 2013, 04:12:24 PM »
Its on the asset store its called Win7 multitouch(with NGUI integration). I am thinking its the problem.. I see your stuff is working if I have all the bools checked for touch or mouse. The hooks setup says to have it all unchecked so not sure why they do that. so i think its something on their end not calling properly for button release.. thanks for the quick response though. i am sure i will figure it out.