Commit b8e83af3 authored by SherryChaos's avatar SherryChaos

new send button for chat

parent 5825fcb2
This diff is collapsed.
......@@ -544,8 +544,10 @@ namespace MDPro3
chainCondition = ChainCondition.No;
OnTiming();
}
if (Input.GetKeyDown(KeyCode.Return)
if ((Input.GetKeyDown(KeyCode.Return)
|| Input.GetKeyDown(KeyCode.KeypadEnter))
&& (!Program.I().room.chatInput.isFocused
|| Program.I().room.chatInput.text == string.Empty))
{
ToChat();
}
......@@ -1540,8 +1542,8 @@ namespace MDPro3
var length_of_message = r.BaseStream.Length;
BinaryMaster binaryMaster;
List<string> selections;
if ((GameMessage)p.Function != GameMessage.UpdateData)
Debug.Log("----------" + (GameMessage)p.Function);
//if ((GameMessage)p.Function != GameMessage.UpdateData)
// Debug.Log("----------" + (GameMessage)p.Function);
//else
// Debug.Log("----------" + (GameMessage)p.Function);
switch ((GameMessage)p.Function)
......
......@@ -110,6 +110,7 @@ namespace MDPro3
roomPlayers.Add(player2);
roomPlayers.Add(player3);
}
public bool chatOn;
public bool chatSwitching;
public void SwitchChat(float moveTime)
......@@ -342,20 +343,22 @@ namespace MDPro3
TcpHelper.CtosMessage_Response(buffer);
}
public void OnSubmit(string chat)
{
if (chat != string.Empty)
TcpHelper.CtosMessage_Chat(chat);
}
public void OnChat(string content)
{
if (content == string.Empty)
return;
OnSubmit(content);
TcpHelper.CtosMessage_Chat(content);
chatInput.text = string.Empty;
}
public void OnSend()
{
if (chatInput.text == string.Empty)
return;
AudioManager.PlaySE("SE_MENU_DECIDE");
OnChat(chatInput.text);
}
public void OnToDuel()
{
TcpHelper.CtosMessage_HsToDuelist();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment