예제 #1
0
파일: DialogForm.cs 프로젝트: moyu3390/MM1
        protected internal override void OnOpen(object userData)
#endif
        {
            base.OnOpen(userData);

            DialogParams dialogParams = (DialogParams)userData;

            if (dialogParams == null)
            {
                Log.Warning("DialogParams is invalid.");
                return;
            }

            m_DialogMode = dialogParams.Mode;
            RefreshDialogMode();

            m_TitleText.text   = dialogParams.Title;
            m_MessageText.text = dialogParams.Message;

            m_PauseGame = dialogParams.PauseGame;
            RefreshPauseGame();

            m_UserData = dialogParams.UserData;

            RefreshConfirmText(dialogParams.ConfirmText);
            m_OnClickConfirm = dialogParams.OnClickConfirm;

            RefreshCancelText(dialogParams.CancelText);
            m_OnClickCancel = dialogParams.OnClickCancel;

            RefreshOtherText(dialogParams.OtherText);
            m_OnClickOther = dialogParams.OnClickOther;
        }
예제 #2
0
 /// <summary>
 /// 打开提示框
 /// </summary>
 /// <param name="uiComponent">UI组件</param>
 /// <param name="dialogParams">提示框参数</param>
 public static void OpenDialog(this UIComponent uiComponent, DialogParams dialogParams)
 {
     //uiComponent.OpenUIForm(UIFormId.DialogForm, dialogParams);
 }