Exemple #1
0
        public void ShowModal(ModalType modalType)
        {
            Modal modal;

            modal = currentWindow.GetModal(modalType);
            // if first time showing modal
            if (modal == null)
            {
                Modal modalPrefab = modalPrefabs.Find(x => x.modalType == modalType);
                if (modalPrefab != null)
                {
                    modal = GameObject.Instantiate(modalPrefab);
                    modal.transform.SetParent(currentWindow.transform, false);
                    // modal.transform.SetAsLastSibling();
                }
                else
                {
                    Debug.LogError("Could not find modal with " + modalType + " type in Resources/" + UiManagerSetting.modalPath + " path.");
                    return;
                }
            }
            currentWindow.AddModal(modal);
            modal.Show();
        }
Exemple #2
0
 public void RemoveModal(Modal <TMod> modal)
 {
     modalList.Remove(modal);
 }
Exemple #3
0
 public void AddModal(Modal <TMod> modal)
 {
     modalList.Add(modal);
 }
Exemple #4
0
 internal void RemoveModal(Modal modal)
 {
     modalList.Remove(modal);
 }