本文整理汇总了C#中InputField.Select方法的典型用法代码示例。如果您正苦于以下问题:C# InputField.Select方法的具体用法?C# InputField.Select怎么用?C# InputField.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InputField
的用法示例。
在下文中一共展示了InputField.Select方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start()
{
input = gameObject.GetComponentsInChildren<InputField>()[0];
input.ActivateInputField();
input.onEndEdit.AddListener (OnSubmit);
input.Select();
}
示例2: SubmitCommand
public void SubmitCommand(InputField inputField)
{
var cmd = inputField.text;
AppendTextToConsole("> " + cmd + "\n");
inputField.text = "";
inputField.Select();
inputField.ActivateInputField();
ParseCommand(cmd);
}
示例3: Update
// Update is called once per frame
void Update()
{
if (activeRitual)
{
inputFieldObj.SetActive(true);
inputField = inputFieldObj.GetComponent<InputField>();
inputField.Select();
inputField.ActivateInputField();
if (initRitual == false)
{
initRitual = true;
inputField.text = "Enter Password; ";
}
if (Input.GetKeyDown(KeyCode.Return))
{
if (passwordEntered == false)
{
passwordEntered = true;
if (inputField.text.CompareTo(password) == 0)
{
passwordCorrect = true;
inputField.text = "password correct\nplease right click";
}
else
{
passwordCorrect = false;
inputField.text = "password incorrect";
Application.LoadLevel("level");
}
}
else
{
inputField.text = DoComputerStuff(inputField.text);
}
}
if (Input.GetMouseButtonDown(1))
{
inputFieldObj.SetActive(false);
activeRitual = false;
Debug.Log("PC Ritual");
}
}
}
示例4: SendChatMessage
// When you hit "SEND" in the chatbox
public void SendChatMessage()
{
GetComponent<AudioSource>().PlayOneShot(menu.buttonClickSFX);
chatmessage = chatmessage.GetComponent<InputField>();
if (chatmessage.text == "")
{
chatmessage.Select();
return;
}
clientManager.resetData();
clientManager.Send("chat-message," + chatmessage.text + "<EOF>");
//Debug.Log("chat-message," + chatmessage.text + "<EOF>");
UpdateChatlog(clientManager.getUsername(), chatmessage.text);
chatmessage.text = "";
chatmessage.Select();
}
示例5: Start
// Use this for initialization
void Start()
{
LoginPanel = GameObject.Find("LoginBox");
RegisterPanel = GameObject.Find("RegisterBox");
RegisterPanel.SetActive(false);
MessageText = GameObject.Find("MessageText");
MessageText.SetActive(false);
UsernameTB = GameObject.Find("UsernameTB").GetComponent<InputField>();
PasswordTB = GameObject.Find("PasswordTB").GetComponent<InputField>();
UsernameTB.Select();
SFServer = new SmartFox();
//Set our basic default connection parameters
this.OurConfigData.Host = "biele.us";
this.OurConfigData.Port = 9933;
this.OurConfigData.Zone = GAME_ZONE;
// Set ThreadSafeMode explicitly, or Windows Store builds will get a wrong default value (false)
SFServer.ThreadSafeMode = true;
SFServer.AddEventListener(SFSEvent.CONNECTION, OnConnection);
SFServer.AddEventListener(SFSEvent.CONNECTION_LOST, OnConnectionLost);
SFServer.AddEventListener(SFSEvent.LOGIN, OnLogin);
SFServer.AddEventListener(SFSEvent.LOGIN_ERROR, OnLoginError);
SFServer.AddEventListener(SFSEvent.EXTENSION_RESPONSE, OnExtensionResponse);
SFServer.Connect(this.OurConfigData);
}
示例6: EnsureInputFieldCoroutine
private IEnumerator EnsureInputFieldCoroutine(InputField inputField)
{
yield return null;
while(!TouchScreenKeyboard.visible && inputField.text.Length == 0)
{
inputField.ActivateInputField();
inputField.Select();
yield return null;
}
}
示例7: ValChanged
public void ValChanged(InputField field)
{
if (field.text.Length > 0)
{
playerName = field.text;
Application.LoadLevel(7);
}
else{
field.placeholder.GetComponent<Text>().text = "Please enter a name";
field.ActivateInputField();
field.Select();
}
}
示例8: Start
/// <summary>
/// Used to initialize variables on creation
/// </summary>
void Start()
{
this.nameInput = GetComponent<InputField>();
nameInput.onEndEdit.AddListener(setPlayerName);
nameInput.Select();
}
示例9: Start
// Use this for initialization
void Start () {
input = gameObject.GetComponent<InputField>();
input.Select();
}