Support => NGUI 3 Support => Topic started by: Nseries on June 11, 2013, 12:26:14 PM
Title: UIInput.selected
Post by: Nseries on June 11, 2013, 12:26:14 PM
Hello, i have some problems with NGUI scripts. The simplest method to show what is, it is to open Example 12 scene. I can use chat, and when I click on any different widget then UIInput, and click on button Enter, the focus(Selected) don`t set to UIInput. Why?
void Update()
{
if(Input.GetKeyUp(KeyCode.Return))
{
mInput.selected=true;
}
}
Why it is dont work after click on different widgets?
Title: Re: UIInput.selected
Post by: ArenMook on June 11, 2013, 01:13:16 PM
You are not checking UICamera.inputHasFocus here, so this code will be triggered even when you are typing -- which is wrong.