Ejemplo n.º 1
0
 public void CloseTab()
 {
     if (currentTabData.Removable)
     {
         if (tabRow.childCount < 2)
         {
             chatRegister.DeleteChatWindow(this);
             return;
         }
         Destroy(currentTabData.Tab.gameObject);
         SelectNextTab(currentTabData.Tab.gameObject);
         StartCoroutine(UpdateCurrentDataTabNextFrame());
     }
 }
Ejemplo n.º 2
0
        public void CloseTab()
        {
            // If the current tab can't be closed and there are no other tabs, hide the entire window instead.
            if (!currentTabData.Removable && tabRow.childCount < 2)
            {
                ToggleChatWindowUI();
            }

            if (currentTabData.Removable)
            {
                if (tabRow.childCount < 2)
                {
                    chatRegister.DeleteChatWindow(this);
                    return;
                }
                Destroy(currentTabData.Tab.gameObject);
                SelectNextTab(currentTabData.Tab.gameObject);
                StartCoroutine(UpdateCurrentDataTabNextFrame());
            }
        }