Author Topic: UIInput  (Read 77634 times)

Spirit117

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: UIInput
« Reply #75 on: August 07, 2014, 03:38:02 AM »
Hi.

Is there a way to make it so when a window opens, I can have the input field I want be auto-selected?
For example, a way to simulate a mouse click on that particular field for OnEnable(), or maybe an inherent setting?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #76 on: August 07, 2014, 04:11:15 AM »
Just select it via UICamera.selectedObject = yourInput.gameObject in script's OnEnable().

Spirit117

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: UIInput
« Reply #77 on: August 10, 2014, 08:15:27 AM »
You are my champion.

DulcetTone

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: UIInput
« Reply #78 on: August 14, 2014, 11:46:22 AM »
Just starting, but I find myself wishing there were an OnLostFocus() event.  I'd like to process the text input as soon as the user tabs away to the next field.

Would it be simple for me to make RemoveFocus() have a callback list, as does Submit()?

tone

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #79 on: August 15, 2014, 08:13:30 AM »
That's OnSelect (false). Use UIEventTrigger to trigger some remote function the same way OnSubmit works in the input field.

TokyoDan

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 53
    • View Profile
Re: UIInput
« Reply #80 on: August 30, 2014, 09:09:14 PM »
For the UIInput validation I know what kind of input the none, Integer, Float, Alphanumeric allow. But what do the Username and Name allow/disallow?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #81 on: August 31, 2014, 03:27:48 PM »
Username makes it all lowercase and restricts it to alphanumerics I believe. Name allows spaces, and capitalizes the first letter of each word.

zippo227

  • Jr. Member
  • **
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 55
    • View Profile
Re: UIInput
« Reply #82 on: January 28, 2015, 02:18:34 AM »
Can you add a field to enable ctrl+a / cmd+a  to select all text?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #83 on: January 28, 2015, 02:40:39 AM »
A field for that? Why? It's the default and expected behaviour of input fields.

zippo227

  • Jr. Member
  • **
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 55
    • View Profile
Re: UIInput
« Reply #84 on: January 28, 2015, 03:53:04 AM »
I agree, but it's not working, even in your example scenes. version 3.7.8 in Unity Editor 4.6.1 on Windows.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #85 on: January 29, 2015, 01:25:35 PM »
It's all working fine for me on Windows stand-alone and Editor both, 3.7.9 in Unity 4.5.5

zippo227

  • Jr. Member
  • **
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 55
    • View Profile
Re: UIInput
« Reply #86 on: January 29, 2015, 01:48:34 PM »
After looking into my build, I am also on 3.7.9. It's just that the Readme does not show the version num 3.7.9. Perhaps you need to look at Unity 4.6.1. Are there any Keyboard inputs that I may have set in my Unity project that would override your functionality for ctrl+a

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #87 on: January 30, 2015, 03:02:04 PM »
Seems Unity broke a bunch of stuff in 4.6.1.

http://www.tasharen.com/forum/index.php?topic=12421.0

zippo227

  • Jr. Member
  • **
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 55
    • View Profile
Re: UIInput
« Reply #88 on: February 04, 2015, 12:47:05 AM »
I do understand that it was a big change in Unity, but as per your advice I always keep everything up to date to the bleeding edge.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput
« Reply #89 on: February 05, 2015, 01:09:28 PM »
I had a look at 4.6.1 and CTRL+A doesn't work in the editor, but it does work fine when you do a build.