/// <summary>
        /// Back to title messages
        /// </summary>
        /// <returns>message</returns>
        // -------------------------------------------------------------------------------------------------------
        public virtual System.Object backToTitleMessages()
        {
            DialogMessages messages = new DialogMessages();

            messages.category    = DialogMessages.MessageCategory.Confirmation;
            messages.title       = "Confirmation";
            messages.mainMessage = "Back to Title Scene";

            return(messages);
        }
        /// <summary>
        /// Create error message for dialog
        /// </summary>
        /// <returns>error message object</returns>
        // -------------------------------------------------------------------------------------------------------
        public virtual System.Object createErrorMessage()
        {
            DialogMessages messages = new DialogMessages();

            messages.category    = DialogMessages.MessageCategory.Error;
            messages.title       = "IEnumerator Error";
            messages.mainMessage = this.m_error;
            messages.subMessage  = "Retry ?";

            return(messages);
        }
        /// <summary>
        /// Create error message for dialog
        /// </summary>
        /// <returns>error message object</returns>
        // -------------------------------------------------------------------------------------------------------
        public virtual System.Object createErrorMessage()
        {
            DialogMessages messages = new DialogMessages();

            messages.category    = DialogMessages.MessageCategory.Error;
            messages.title       = "WWW Error";
            messages.urlIfNeeded = this.m_errorUrl;
            messages.mainMessage = this.m_error;
            messages.subMessage  = "Retry ?";

            return(messages);
        }
Example #4
0
        /// <summary>
        /// Add error
        /// </summary>
        /// <param name="messages">System.Object</param>
        // ----------------------------------------------------------------------------------------
        protected virtual void addErrorStackIfError(System.Object messages)
        {
            if (messages == null)
            {
                return;
            }

            // ---------------------------

            DialogMessages dialogMessages = messages as DialogMessages;

            if (dialogMessages == null)
            {
#if UNITY_EDITOR
                Debug.LogWarning("(#if UNITY_EDITOR) You should override this function if you want to store error messages");
#endif
                return;
            }

            // ---------------------------

            if (dialogMessages.category != DialogMessages.MessageCategory.Error)
            {
                return;
            }

#if UNITY_EDITOR
            Debug.LogError("(#if UNITY_EDITOR) " +
                           dialogMessages.urlIfNeeded + " | " +
                           dialogMessages.mainMessage + " | " +
                           dialogMessages.subMessage + " | " +
                           dialogMessages.anyMessage);
#endif

            if (this.m_numberOfErrorStack <= 0)
            {
                return;
            }

            // --------------------------

            if (this.m_errorDialogMessagesStack.Count >= this.m_numberOfErrorStack)
            {
                this.m_errorDialogMessagesStack.RemoveAt(0);
            }

            this.m_errorDialogMessagesStack.Add(messages);
        }
Example #5
0
        /// <summary>
        /// Set DialogMessages
        /// </summary>
        /// <param name="messages">System.Object</param>
        // ------------------------------------------------------------------------------------------
        public override void setMessages(System.Object messages)
        {
            if (messages == null)
            {
                this.clear();
                return;
            }

            // ----------------------------

            DialogMessages dialogMessages = messages as DialogMessages;

            if (dialogMessages == null)
            {
#if UNITY_EDITOR
                Debug.LogWarning("(#if UNITY_EDITOR) You should override this function");
#endif
                this.clear();
                return;
            }

            // ----------------------------

            if (this.m_refTitleText)
            {
                this.m_refTitleText.text = dialogMessages.title;
            }

            if (this.m_refMainText)
            {
                this.m_refMainText.text = dialogMessages.mainMessage;
            }

            if (this.m_refSubText)
            {
                this.m_refSubText.text = dialogMessages.subMessage;
            }
        }