Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Amitloaf on June 13, 2012, 09:39:28 AM

Title: OnKey help
Post by: Amitloaf on June 13, 2012, 09:39:28 AM
Can't seem to get that to work. I tried attaching that to many GUI items and I can't get a response. I activated Keyboard on the camera. I also tried to attach it to a button, clicked on the button and then pressed the key to no avail.
Am I missing something?

Also, Checked the Chat example. You don't use it there but just the normal GetKeyUp
Title: Re: OnKey help
Post by: PhilipC on June 13, 2012, 09:58:04 AM
I will talk to Mike later today about this get his opinion on it. It seems that UICamera only sends out specific keys (escape, tab, arrows). I will keep you posted.
Title: Re: OnKey help
Post by: PhilipC on June 13, 2012, 05:49:31 PM
So I was correct OnKey only handles specific events that we have defined. What is it that you are trying to do we dont understand.
Title: Re: OnKey help
Post by: Amitloaf on August 06, 2012, 10:30:16 AM
I created a generic message box with NGUI. I wanted Enter and Space to click the OK button. Later I even went on further and added a YesNo message box with ESC pressing the No button.
Title: Re: OnKey help
Post by: PhilipC on August 06, 2012, 10:34:34 AM
You would have to write your own script which will listen for those buttons being pressed.
Title: Re: OnKey help
Post by: ArenMook on August 06, 2012, 01:47:40 PM
I created a generic message box with NGUI. I wanted Enter and Space to click the OK button. Later I even went on further and added a YesNo message box with ESC pressing the No button.
Isn't there a script for this? UIButtonKey, or something like that? I'm not home right now so I can't check. If it's not in NGUI, then I have it in Windward and will post it when I get home.