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); }); }
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); }
protected virtual void OnBeforeShowDialog(BaseDialog dialog, Action onComplete) { EventUtility.SafeInvokeAction(onComplete); }
protected virtual void OnAfterHideDialog(BaseDialog dialog, Action onComplete) { EventUtility.SafeInvokeAction(onComplete); }