Welcome,
Guest
. Please
login
or
register
.
November 30, 2023, 10:12:16 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Return on UIInput
« previous
next »
Print
Pages: [
1
]
Author
Topic: Return on UIInput (Read 1979 times)
Tatanan
Jr. Member
Thank You
-Given: 11
-Receive: 0
Posts: 81
Return on UIInput
«
on:
November 30, 2015, 06:51:14 AM »
When typing "Return" on a UIInput, the "onsubmit" event is triggered.
When typing "return" but on the numerical part on the keyboard, no onsubmit is triggered.
So, one "return" works and one "return" doesn't work.
Could can i make both one work?
Logged
Game developer on
Casual Arena
.
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Return on UIInput
«
Reply #1 on:
December 01, 2015, 07:31:23 AM »
I already addressed it in the Pro version of NGUI. Open up UIInput.cs, search for "KeyCode.Return" and add handling for Keycode.KeypadEnter like so:
Line 801:
if
(
UICamera
.
GetKeyDown
(
mCam
.
submitKey0
)
||
(
mCam
.
submitKey0
==
KeyCode
.
Return
&&
UICamera
.
GetKeyDown
(
KeyCode
.
KeypadEnter
)
)
)
Line 816:
if
(
UICamera
.
GetKeyDown
(
mCam
.
submitKey1
)
||
(
mCam
.
submitKey1
==
KeyCode
.
Return
&&
UICamera
.
GetKeyDown
(
KeyCode
.
KeypadEnter
)
)
)
Logged
tbrewerart
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 7
Re: Return on UIInput
«
Reply #2 on:
December 14, 2015, 05:48:35 PM »
It seems that the Return key is not recognized (Submit) with NGUI input field on Mac OSX web player in 5.3.0f4. I cannot execute multiplayer chat using submit. If I use the OnChange field it works –– but with the expected results: continual readout. Return Key submit works fine in the Unity editor.
This seems to be a Unity bug, not NGUI, yes? Is there a fix?
I am uncertain what to do here. Is there a temporary workaround?
Thanks for your time.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Return on UIInput
«
Reply #3 on:
December 14, 2015, 10:33:41 PM »
Sounds like a Unity bug, yes. I thought web player support was discontinued though, with Chrome and others no longer support plugins? Of course WebGL export has its own host of issues...
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Return on UIInput