Author Topic: UIInput  (Read 59000 times)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #15 on: January 08, 2014, 01:57:21 PM »
If you make UIInput.Submit() a public function then you can choose it in the inspector under UIButton's On Click notification.

CBYum

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: UIInput
« Reply #16 on: January 17, 2014, 11:53:29 AM »
Just downloaded 3.0.8 after seeing that it has better input handling, but we don't see anything different on mobile devices (other than how the caret is handled). Is there some switch we need to use or does this mean that these enhancements are PC or other platforms only?

Also had to change the order of setting the UIInput.value and the UILabel.text it refers to. Setting the text THEN value errored but reversing them fixed it. (If I don't explicitly set the UIInput.value the same as label the entry field gets refilled with the last edited text rather than the last set value of the label.). This is all on Android at the moment.

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #17 on: January 18, 2014, 10:30:57 PM »
The enhancements are for the desktop platforms. Mobiles have their own input field, which is why it didn't make much sense to have both functionality.

arumons

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: UIInput
« Reply #18 on: January 22, 2014, 11:02:05 PM »
I want to distinguish "close keyboard"(touch not keyboard area) and pressing OK button on Android device.
However, submit that will be called in case of both.
(In case of both, mKeyboard.done is true and mKeyboard.wasCanceled is false in Update function...) :'(


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #19 on: January 23, 2014, 07:11:48 AM »
Yup, it's a Unity bug. I suggest reporting it.

MOST2K2

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: UIInput
« Reply #20 on: January 28, 2014, 09:08:44 AM »
I use this widget in my android Project, but when the Keyboard opens the text is selected, how can i disable selection? after hit 'done' on the Keyboard the two selection marker are still there see this Picture http://3.bp.blogspot.com/-6qRC_rfbBmc/TqOmKistjdI/AAAAAAAABKA/QnJ-UwerDc8/s1600/copypaste.jpg

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #21 on: January 28, 2014, 11:36:07 AM »
NGUI has nothing to do with the system input. Even Unity has little to do with it. That's your device's OS.

MOST2K2

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: UIInput
« Reply #22 on: January 28, 2014, 01:18:04 PM »
but after the keyboard is closed it looks like this (see attachment)...thats why i dont want to have selected the text automatically.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #23 on: January 29, 2014, 10:45:13 AM »
Can't say I've ever seen anything like that on any of the mobile devices I have. Are those the system's selection arrows remaining behind when you close the keyboard? That just seems like some bug with the version of the OS your device uses.

MOST2K2

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: UIInput
« Reply #24 on: January 29, 2014, 04:50:47 PM »
yes that are the system's selection arrows when the keyboard closes, you have to selected some test before close. i have the nexus 5 with kitcat 4.4.
is there any way to prevent selection when keyboard opens?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #25 on: January 29, 2014, 11:12:59 PM »
NGUI doesn't pass any selection information to the OS. Just the text. Look inside UIInput line 392.

hrlarsen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 35
    • View Profile
Re: UIInput
« Reply #26 on: February 04, 2014, 03:40:39 PM »
I would love to see that the UIInput field had the same properties on mobile as it has on desktop, especially with caret and placing the caret on press etc. This feature however would only be relevant when setting TouchScreenKeyboard.hideInput = true as this hides the normal input field on the mobile device.

I do not know if this is possible already? because then I would love to hear how


Kingtem

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: UIInput
« Reply #27 on: February 17, 2014, 04:43:10 AM »
Hi Aren,
      My NGUI 3.4.9 dosen't show the "Select on Tab". I tried import NGUI into different project but the same result, then I open the "UIInputField" script, which the variabe is correct but just dont show itself in inspector, its strange...... :-\

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #28 on: February 17, 2014, 01:48:45 PM »
It doesn't show in inspector? It's between "Selection Color" and "Input Type" fields.

Kingtem

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: UIInput
« Reply #29 on: February 18, 2014, 04:07:16 AM »
Yes, I've tried many times. Besides, if I create a new variable(Any type) next to "selectOnTab", the variable dosen't show in inspector too.