Author Topic: Missing UIInput caret / cursor  (Read 5535 times)

lukos86

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Missing UIInput caret / cursor
« on: November 12, 2013, 07:34:28 AM »
Hi, Ive noticed this problem after in last few 3.0.x releases.
Character caret is missing on mobile devices once entering text. Its all fine in editor, I can see '|' char.

Any clues how to fix this?

Thanks in advance

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Missing UIInput caret / cursor
« Reply #1 on: November 12, 2013, 02:58:14 PM »
Change the line 235 from
  1. protected bool needsTextCursor { get { return (isSelected && mKeyboard == null); } }
to
  1. protected bool needsTextCursor { get { return (isSelected && mKeyboard != null); } }

lukos86

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Missing UIInput caret / cursor
« Reply #2 on: November 14, 2013, 08:17:07 AM »
Works perfectly, thanks for help  :)

mechanicals

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Missing UIInput caret / cursor
« Reply #3 on: October 17, 2014, 06:42:08 AM »
Hi,

I am facing the same issue regarding the Caret missing in Windows 8 Phone, but with the updated UIInput.cs. The updated files does not have the "needsTextCursor".
Kindly help out.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Missing UIInput caret / cursor
« Reply #4 on: October 18, 2014, 08:30:02 AM »
Caret doesn't show up unless you choose to "hide input". Otherwise there would be two of them -- one drawn by NGUI and another drawn by the OS text field.

mechanicals

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Missing UIInput caret / cursor
« Reply #5 on: October 20, 2014, 12:29:41 AM »
Hi ArenMook,

I didn't quite get what you meant. Can you elaborate a bit as to how to display the caret using for mobile Devices.
What part of code in NGUI do I need to change ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Missing UIInput caret / cursor
« Reply #6 on: October 20, 2014, 11:28:09 PM »
None. "Hide Input" is an option on the NGUI's input field. Check it, and the OS input field won't be visible. Only the keyboard will be visible.