Exemple #1
0
        public void ShowDialog(BaseDialog dialog, Action onComplete = null, Action <int> result = null)
        {
            if (!dialog)
            {
                return;
            }
            if (dialog.IsShowing)
            {
                return;
            }

            OnBeforeShowDialog(dialog, () => {
                dialog.Show(() => {
                    OnAfterShowDialog(dialog, onComplete);
                }, result);
            });
        }
Exemple #2
0
        public void HideDialog(BaseDialog dialog, Action onComplete = null)
        {
            if (!dialog)
            {
                return;
            }
            if (!dialog.IsShowing)
            {
                return;
            }

            OnBeforeHideDialog(dialog, () => {
                dialog.Hide(() => {
                    OnAfterHideDialog(dialog, onComplete);
                });
            });
        }
 public void InitDialogButton(BaseDialog dialog, int idx)
 {
     m_Dialog = dialog;
     m_Idx    = idx;
     onClick.AddListener(OnClick);
 }
Exemple #4
0
 protected virtual void OnBeforeShowDialog(BaseDialog dialog, Action onComplete)
 {
     EventUtility.SafeInvokeAction(onComplete);
 }
Exemple #5
0
 protected virtual void OnAfterHideDialog(BaseDialog dialog, Action onComplete)
 {
     EventUtility.SafeInvokeAction(onComplete);
 }