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.
// This is event receiver class.
public GameObject m_pUIInput;// UIInput Widget object
void EventSubmit()// OnSubmit
{
print("OnSubmit!!");
m_pUIInput.GetComponent<UIInput>().label.text="";
m_pUIInput.GetComponent<UIInput>().selected=true;
}
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.