コード例 #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();
        }
コード例 #2
0
ファイル: Window.cs プロジェクト: NicoMMendez/OpenUi
 public void RemoveModal(Modal <TMod> modal)
 {
     modalList.Remove(modal);
 }
コード例 #3
0
ファイル: Window.cs プロジェクト: NicoMMendez/OpenUi
 public void AddModal(Modal <TMod> modal)
 {
     modalList.Add(modal);
 }
コード例 #4
0
ファイル: Window.cs プロジェクト: Avatarchik/OpenUi
 internal void RemoveModal(Modal modal)
 {
     modalList.Remove(modal);
 }