예제 #1
0
 private void Update()
 {
     if (Input.GetKeyDown(Shortcuts.SEND_MESSAGE))
     {
         if (input.IsInteractable() && IsMessageValid)
         {
             AddMessage(input.text);
             input.text = string.Empty;
         }
         input.interactable = !input.interactable;
         if (input.IsInteractable())
         {
             input.Select();
         }
     }
 }
예제 #2
0
 private void ToggleChatInput()
 {
     if (chatInput.IsInteractable())
     {
         chatInput.interactable = false;
         chatting = false;
     }
     else
     {
         chatting = true;
         chatInput.interactable = true;
         chatInput.ActivateInputField();
     }
 }
예제 #3
0
    // Update is called once per frame
    void Update()
    {
        bool newInteractable = text.IsInteractable();

        if (newInteractable != interactable)
        {
            miniLabel.color = newInteractable ? miniLabelColor :
                              disabledColor;
            label.color = newInteractable ? labelColor :
                          disabledColor;
            inputText.color = newInteractable ? inputTextColor :
                              disabledColor;
        }
        interactable = newInteractable;
    }