Exemplo n.º 1
0
    private void InitializeMessages()
    {
        CreateNewPrivateDialog("Default", ChatTypeEnum.Default, false);
        BtnChatManager.BtnChangeLastCommunication(ChatTypeEnum.Default, "Default");

        Message msg1 = new Message("Tibia3d", "Welcome");

        Chat.Enqueue(msg1);
    }
Exemplo n.º 2
0
    private void CreateNewPrivateDialog(string nick, ChatTypeEnum chatTypeEnum = ChatTypeEnum.Private, bool canClose = false)
    {
        ChatType newChatBtn = (Instantiate(GUIHandler.instance.prefabChatBtn, GUIHandler.instance.ChatSwitchPanel.transform)).GetComponent <ChatType>();

        newChatBtn._chatTypeEnum = chatTypeEnum;
        newChatBtn.name_chat     = nick;
        newChatBtn.canClose      = canClose;

        newChatBtn.Initialize();

        BtnChatManager.ChatTypeOpen.Add(newChatBtn);
        GUIHandler.instance.MenuCreateNewChat.SetActive(false);
        newChatBtn.GetComponent <Button>().onClick.AddListener(() => BtnChatManager.BtnChangeLastCommunication(newChatBtn._chatTypeEnum, newChatBtn.name_chat));


        BtnChatManager.BtnChangeLastCommunication(newChatBtn._chatTypeEnum, newChatBtn.name_chat);
        RefreshChat();
    }