Author Topic: OnKey help  (Read 3115 times)

Amitloaf

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
    • View Profile
OnKey help
« 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

PhilipC

  • Guest
Re: OnKey help
« Reply #1 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.

PhilipC

  • Guest
Re: OnKey help
« Reply #2 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.

Amitloaf

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
    • View Profile
Re: OnKey help
« Reply #3 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.

PhilipC

  • Guest
Re: OnKey help
« Reply #4 on: August 06, 2012, 10:34:34 AM »
You would have to write your own script which will listen for those buttons being pressed.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: OnKey help
« Reply #5 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.