输入框回车

GUI.SetNextControlName("InputFieldLC");   inputLC = GUI.TextField(new Rect(Screen.width / 2 + 240,Screen.height - 30,100,20),inputLC);   if(GUI.Button(new Rect(Screen.width / 2 + 340, Screen.height - 30,40,20),"定位"))   {    if(wwwIng == false)    {     wwwIng = true;     Application.ExternalCall("DingWeiLC", qjModel.lloryl, inputLC, qjModel.lx);    }   }      if (Event.current.isKey && Event.current.keyCode == KeyCode.Return && GUI.GetNameOfFocusedControl() == "InputFieldLC")   {    if(wwwIng == false)    {     wwwIng = true;     Application.ExternalCall("DingWeiLC", qjModel.lloryl, inputLC, qjModel.lx);    }   }

posted @ 2012-03-10 15:13  顺手  阅读(285)  评论(0)    收藏  举报