Exemplo n.º 1
0
    public void Init(PopupType type, string msg, string titleText = null, PopupQuestionCompleteDelegate _onCompleteCallBack = null)
    {
        SetupTitle(type, titleText);

        message.text       = msg;
        onCompleteCallBack = _onCompleteCallBack;
    }
Exemplo n.º 2
0
 public PopupQuestionCommand(PopupQuestion instance, PopupType _type, string _message, string _title, PopupQuestionCompleteDelegate[] completeCallbacks)
 {
     popupQuestion = instance;
     type          = _type;
     message       = _message;
     title         = _title;
     foreach (PopupQuestionCompleteDelegate callback in completeCallbacks)
     {
         completeCallback += callback;
     }
 }
Exemplo n.º 3
0
    public void NewQuestion(PopupType type, string title, string message, PopupQuestionCompleteDelegate onQuestionPopupCompeted)
    {
        PopupQuestionCompleteDelegate[] completeCallbacks = { OnQuestionPopupCompeted, onQuestionPopupCompeted };
        PopupQuestionCommand            questionCommand   = new PopupQuestionCommand(PopupQuestionInstance, type, message, title, completeCallbacks);

        commandQueue.AddLast(questionCommand);
        onQuestionPopupCompeted = OnQuestionPopupCompeted;
        // If there is only one command in queue, then execute it.
        if (commandQueue.Count == 1)
        {
            questionCommand.Execute();
        }
    }