Ejemplo n.º 1
0
 public void disPlayDialog(ChatClient.Conversation conversation)
 {
     if (currentChat != null && currentChat != conversation.toggle)
     {
         currentChat.toggle.isOn = false;
     }
     conversation.toggle.toggle.isOn = true;
     currentChat = conversation.toggle;
 }
Ejemplo n.º 2
0
        public Conversation(TcpClient c, ChatClient _chatClient)
        {
            UICreated = false;
//            tcpClient = c;
//            stream = c.GetStream();
            userItem   = null;
            chatClient = _chatClient;
            dialog     = null;
            toggle     = null;
        }
Ejemplo n.º 3
0
        public Conversation(TcpClient c, string _remoteName, ushort _remotePort, ChatClient _chatClient)
        {
            UICreated = false;
//            tcpClient = c;
            remoteName = _remoteName;
            remotePort = _remotePort;
            userItem   = null;
            chatClient = _chatClient;
            dialog     = null;
            toggle     = null;
        }
Ejemplo n.º 4
0
    public void createDialog(ChatClient.Conversation conversation)
    {
        //Create toggle for a conversation
        GameObject newtoggle = (GameObject)GameObject.Instantiate(TogglePrefab);

        newtoggle.transform.SetParent(toggleGroup.transform);
        newtoggle.SetActive(true);
        toggleControl newToggleControl = newtoggle.GetComponent <toggleControl>();

        conversation.toggle = newToggleControl;

        //Create Dialog for a conversation
        GameObject    newdialog = (GameObject)GameObject.Instantiate(DialogPrefab);
        RectTransform newRect   = newdialog.GetComponent <RectTransform>();

        newdialog.transform.SetParent(chatPage.transform);
        newRect.localPosition = DialogStartPosition.localPosition;
        conversation.dialog   = newdialog.GetComponent <DialogControl>();
        conversation.dialog.SetUp(conversation);

        newToggleControl.SetUp(conversation.remoteName, conversation, this);

        disPlayDialog(conversation);
    }
Ejemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     currentChat = null;
 }