Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: slway07 on October 18, 2013, 12:53:39 AM

Title: UIInput problem.
Post by: slway07 on October 18, 2013, 12:53:39 AM
I try using UIInput widget.
I have two problems.
One is I can't reset the text when I pressed Enter.
Second is I can't set the UIInput focused when I pressed Enter. Here's my code.

With my experience When I press Enter Key on UIInput widget, it loses focus.

  1. // This is event receiver class.
  2. public GameObject m_pUIInput;   // UIInput Widget object
  3. void EventSubmit()  // OnSubmit
  4. {
  5. print("OnSubmit!!");
  6.   m_pUIInput.GetComponent<UIInput>().label.text = "";
  7.   m_pUIInput.GetComponent<UIInput>().selected = true;
  8. }
  9.  

What am I doing wrong?? Help me out.
Thanks.
Title: Re: UIInput problem.
Post by: ArenMook on October 18, 2013, 05:58:58 PM
Did you not see the chat window example? It does both of these.