playMaker

Author Topic: GUILayout Text Field  (Read 2017 times)

vonpopov

  • Junior Playmaker
  • **
  • Posts: 98
GUILayout Text Field
« on: June 14, 2014, 10:40:05 AM »
I would like my GUILayout Text Field
NOT to accept "return" entry.

How can i do that ?
GuiSkin ?

ghost010

  • Junior Playmaker
  • **
  • Posts: 51
Re: GUILayout Text Field
« Reply #1 on: June 15, 2014, 05:01:21 PM »
What purpose do you have for your guitext field?

IT accepts returns for a reason.
So far i can guess is that you ether need to limit the count of chars to be used or just use GUItext instead?

vonpopov

  • Junior Playmaker
  • **
  • Posts: 98
Re: GUILayout Text Field
« Reply #2 on: June 15, 2014, 05:11:30 PM »
What purpose do you have for your guitext field?

IT accepts returns for a reason.
So far i can guess is that you ether need to limit the count of chars to be used or just use GUItext instead?

I want the player to be able to create the name of its army. So it has to be a name, space are allowed but no return i don't want a "text", but just a name.

Maybe there is something better than Text field ? like "word field" ? :D



ghost010

  • Junior Playmaker
  • **
  • Posts: 51
Re: GUILayout Text Field
« Reply #3 on: June 15, 2014, 05:19:49 PM »
If i was you,you should limit the players char count to like.. 10.give the text field a max width.

Look at the playmakers photon example and look for this(see image)
It wont receive returns and it shows how to save it  without any buttons to be pressed.
(you can ignore all the photon stuff)