Author Topic: Avoid new line character "\n" in UIInput  (Read 3056 times)

jenemia

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Avoid new line character "\n" in UIInput
« on: July 07, 2015, 09:20:41 PM »
I using NGUI 3.5 version.

I make chatting UI using UIInput.
if user input chat message "adfdf\ndsfsdf"  in UIInput then show you "adfdf". Because UIinput set max lines 1

I wander not function "\n" like your example "Example 0 Control Widgets"
What is different this?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Avoid new line character "\n" in UIInput
« Reply #1 on: July 08, 2015, 06:43:21 PM »
"\n" does not get interpreted as 1 character by UIInput in NGUI, at least not in the current up-to-date version. NGUI 3.5 is extremely old and you should update.

jenemia

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Avoid new line character "\n" in UIInput
« Reply #2 on: July 09, 2015, 03:50:40 AM »
I anticipate get many problem when upgrade NGUI ...
I'm not sure what I'm supposed to be looking for check code..
Would tell me ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Avoid new line character "\n" in UIInput
« Reply #3 on: July 12, 2015, 07:49:31 PM »
Sorry, no. 3.5 is too old.