示例#1
0
        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;
        }
 private static void OpenNativeDialog(DialogParams dialogParams)
 {
     // TODO:这里应该弹出原生对话框,先简化实现为直接按确认按钮
     if (dialogParams.OnClickConfirm != null)
     {
         dialogParams.OnClickConfirm(dialogParams.UserData);
     }
 }
示例#3
0
 public static void OpenDialog(this UIComponent uiComponent, DialogParams dialogParams)
 {
     if (((ProcedureBase)GameEntry.Procedure.CurrentProcedure).UseNativeDialog)
     {
         OpenNativeDialog(dialogParams);
     }
     else
     {
         uiComponent.OpenUIForm(UIFormId.DialogForm, dialogParams);
     }
 }
示例#4
0
        public void SetConfirUI(DialogParams dialogParams)
        {
            if (m_title != null)
            {
                m_title.text = dialogParams.Title;
            }

            if (m_content != null)
            {
                m_content.text = dialogParams.Message;
            }

            OnClickConfirm = dialogParams.OnClickConfirm;
            OnClickCancel  = dialogParams.OnClickCancel;
            m_UserData     = dialogParams.UserData;
        }
示例#5
0
 private static void OpenNativeDialog(DialogParams dialogParams)
 {
     throw new System.NotImplementedException("OpenNativeDialog");
 }