Beispiel #1
0
    public void OnBeginDrag(PointerEventData eventData)
    {
        if (!Data.Removable)
        {
            return;
        }

        originParent = transform.parent;
        transform.SetParent(chatWindow.GetChatManager().transform);

        chatWindow.LoadTab();

        Text.raycastTarget  = false;
        image.raycastTarget = false;
    }
Beispiel #2
0
    public void Submit()
    {
        //Empty tab names cause visual glitches
        if (string.IsNullOrEmpty(tabNameField.text))
        {
            tabNameField.text = "Honk!";
        }

        List <ChatChannel> channels = options.Select(option => option.TickedChannel())
                                      .Where(channel => !string.IsNullOrEmpty(channel.Name)).ToList();

        //A tab without channels is pointless
        if (channels.Count <= 0)
        {
            Close();
            return;
        }

        chatWindow.GetChatManager().CreateChatWindow(new ChatTabData(tabNameField.text, channels, true, null),
                                                     chatWindow, Vector2.zero);

        Close();
    }