コード例 #1
0
    public void Init(PopupType type, string msg, string titleText = null, PopupMessageCompleteDelegate _onConfirmedCallBack = null)
    {
        SetupTitle(type, titleText);

        message.text        = msg;
        onConfirmedCallBack = _onConfirmedCallBack;
    }
コード例 #2
0
 public PopupMessageCommand(PopupMessage instance, PopupType _type, string _message, string _title, PopupMessageCompleteDelegate[] completeCallbacks)
 {
     popupMessage = instance;
     type         = _type;
     message      = _message;
     title        = _title;
     foreach (PopupMessageCompleteDelegate callback in completeCallbacks)
     {
         completeCallback += callback;
     }
 }
コード例 #3
0
ファイル: PopupManager.cs プロジェクト: isahakv/TetrisGame
    public void NewMessage(PopupType type, string title, string message, PopupMessageCompleteDelegate onMessagePopupCompeted = null)
    {
        PopupMessageCompleteDelegate[] completeCallbacks = { OnMessagePopupCompeted, onMessagePopupCompeted };
        PopupMessageCommand            messageCommand    = new PopupMessageCommand(PopupMessageInstance, type, message, title, completeCallbacks);

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