コード例 #1
0
 public virtual void textBoxEnter(TextBox sender)
 {
     if (sender is ChatTextBox)
     {
         ChatTextBox box = sender as ChatTextBox;
         if (box.finalText.Count > 0)
         {
             bool include_color_information = true;
             if (box.finalText[0].message != null && box.finalText[0].message.Length > 0 && box.finalText[0].message.ToString()[0] == '/' && box.finalText[0].message.Split(' ')[0].Length > 1)
             {
                 include_color_information = false;
             }
             if (box.finalText.Count != 1 || ((box.finalText[0].message != null || box.finalText[0].emojiIndex != -1) && (box.finalText[0].message == null || box.finalText[0].message.Trim().Length != 0)))
             {
                 string textToSend = ChatMessage.makeMessagePlaintext(box.finalText, include_color_information);
                 textBoxEnter(textToSend);
             }
         }
         box.reset();
         cheatHistoryPosition = -1;
     }
     sender.Text = "";
     clickAway();
 }