当前位置: 首页>>代码示例>>C#>>正文


C# InputField.Select方法代码示例

本文整理汇总了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();
 }
开发者ID:alebianITBA,项目名称:HCI-Avanzado,代码行数:8,代码来源:FocusNameInputField.cs

示例2: SubmitCommand

    public void SubmitCommand(InputField inputField)
    {
        var cmd = inputField.text;
        AppendTextToConsole("> " + cmd + "\n");
        inputField.text = "";
        inputField.Select();
        inputField.ActivateInputField();

        ParseCommand(cmd);
    }
开发者ID:BrianErikson,项目名称:ScriptingTheGame,代码行数:10,代码来源:TosInterface.cs

示例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");
            }
        }
        

    }
开发者ID:christopher-mccreadie,项目名称:RickyRitualStaffsGGJ,代码行数:49,代码来源:PCRitual.cs

示例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();
    }
开发者ID:hectoram,项目名称:CS113,代码行数:22,代码来源:MultiplayerLobbyScript.cs

示例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);
    }
开发者ID:Gabe-Biele,项目名称:Project-Circleage,代码行数:31,代码来源:LoginConnector.cs

示例6: EnsureInputFieldCoroutine

    private IEnumerator EnsureInputFieldCoroutine(InputField inputField)
    {
        yield return null;

        while(!TouchScreenKeyboard.visible && inputField.text.Length == 0)
        {
            inputField.ActivateInputField();
            inputField.Select();

            yield return null;
        }
    }
开发者ID:arloistale,项目名称:SlugJam2015,代码行数:12,代码来源:LoginController.cs

示例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();
         
     }
 }
开发者ID:Ellesent,项目名称:EcoGalaxy,代码行数:14,代码来源:Button.cs

示例8: Start

 /// <summary>
 /// Used to initialize variables on creation
 /// </summary>
 void Start()
 {
     this.nameInput = GetComponent<InputField>();
     nameInput.onEndEdit.AddListener(setPlayerName);
     nameInput.Select();
 }
开发者ID:bi3mer,项目名称:gmap377_leathGloves_inc,代码行数:9,代码来源:Name_InputField.cs

示例9: Start

	// Use this for initialization
	void Start () {
        input = gameObject.GetComponent<InputField>();
        input.Select();
	
	}
开发者ID:Ellesent,项目名称:EcoGalaxy,代码行数:6,代码来源:INPUTWHY.cs


注:本文中的InputField.Select方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。