コード例 #1
0
 public void ShowMessage(string context, MessageBoxEnum.Style style, MessageBoxEnum.OnReceiveMessageBoxResult callback)
 {
     if (messageBoxPanel == null)
     {
         messageBoxPanel = GameObject.FindObjectOfType <MessageBoxPanel>();
         if (messageBoxPanel == null)
         {
             messageBoxPanel = ResManager.Instance.LoadResComponent <MessageBoxPanel>("Lobby/Prefab/UI/MessageUI");
         }
         messageBoxPanel.transform.SetParent(canvas);
         messageBoxPanel.transform.localPosition = Vector3.zero;
     }
     messageBoxPanel.ShowMessageBox(context, style, callback);
 }
コード例 #2
0
        public void ShowMessageBox(string context, MessageBoxEnum.Style style, MessageBoxEnum.OnReceiveMessageBoxResult callback)
        {
            this.lblNote.text = context;
            this.callback     = callback;
            gameObject.SetActive(true);
            this.ResetButtons();

            if (style == MessageBoxEnum.Style.Ok)
            {
                this.btnSubmit.gameObject.SetActive(true);
            }
            else if (style == MessageBoxEnum.Style.OkAndCancel)
            {
                btnYes.gameObject.SetActive(true);
                btnNo.gameObject.SetActive(true);
            }
        }