Exemplo n.º 1
0
//    Color gray = new Color(0.8f, 0.8f, 0.8f);

    public override void Move(int x, int y)
    {
        base.Move(x, y);
        userTextInput.SetFocus(false);
        pwdTextInput.SetFocus(false);

        switch (focusIndex)
        {
        case 0:
            userTextInput.selectedStateGO.SetActive(true);
            pwdTextInput.selectedStateGO.SetActive(false);
            okBtn.SetSprite("longBtn");
            resetBtn.SetSprite("longBtn");
            break;

        case 1:
            userTextInput.selectedStateGO.SetActive(false);
            pwdTextInput.selectedStateGO.SetActive(true);
            okBtn.SetSprite("longBtn");
            resetBtn.SetSprite("longBtn");
            break;

        case 2:
            userTextInput.selectedStateGO.SetActive(false);
            pwdTextInput.selectedStateGO.SetActive(false);
            okBtn.SetSprite("longBtn2");
            resetBtn.SetSprite("longBtn");
            break;

        case 3:
            userTextInput.selectedStateGO.SetActive(false);
            pwdTextInput.selectedStateGO.SetActive(false);
            okBtn.SetSprite("longBtn");
            resetBtn.SetSprite("longBtn2");
            break;
        }
    }
Exemplo n.º 2
0
    void ToogleChatDisplay()
    {
        if (isChatMode)
        {
            tk2dUITextInput textboxScript = chatTextboxObject.GetComponent <tk2dUITextInput>();
            string          userInput     = textboxScript.Text;

            // Send chat to server
            sceneManager.SendChatToServer(userInput);

            textboxScript.Text = "";

            chatTextboxObject.SetActive(false);
            setVisibleOnce = 0;
            isChatMode     = false;
        }
        else
        {
            chatTextboxObject.SetActive(true);
            tk2dUITextInput textboxScript = chatTextboxObject.GetComponent <tk2dUITextInput>();
            textboxScript.SetFocus();
            isChatMode = true;
        }
    }