コード例 #1
0
        public void ShowMessageBox(string title, string message, eMessageBoxType messageBoxType,
                                   System.Action <bool> completed = null, float activeTime = 0.0f)
        {
            MessageBoxWidget widget =
                m_widgetRepositories.FindWidget("MessageBoxWidget") as MessageBoxWidget;

            if (widget == null)
            {
                widget = m_widgetRepositories.CreateWidget <MessageBoxWidget>("System/MessageBoxWidget");
            }

            if (widget != null)
            {
                if (widget.IsActive == true)
                {
                    m_messageBoxQueue.Enqueue(
                        new MessageBoxDataParam(title, message, messageBoxType, completed, activeTime));
                }
                else
                {
                    MessageBoxDataParam messageBoxDataParam =
                        new MessageBoxDataParam(title, message, messageBoxType, completed, activeTime);
                    widget.Show(activeTime, messageBoxDataParam);
                }
            }
        }
コード例 #2
0
        protected void UpdateMessageBoxQueue(float delta)
        {
            if (m_messageBoxQueue.Any() == false)
            {
                return;
            }

            MessageBoxWidget widget = m_widgetRepositories.FindWidget("MessageBoxWidget") as MessageBoxWidget;

            if (widget != null && widget.IsGameOjectActive != true)
            {
                MessageBoxDataParam messageBoxDataParam = m_messageBoxQueue.Dequeue();
                if (messageBoxDataParam != null)
                {
                    widget.Show(messageBoxDataParam.ActiveTime, messageBoxDataParam);
                }
                messageBoxDataParam.Dispose();
            }
        }