public void Init(PopupType type, string msg, string titleText = null, PopupMessageCompleteDelegate _onConfirmedCallBack = null) { SetupTitle(type, titleText); message.text = msg; onConfirmedCallBack = _onConfirmedCallBack; }
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; } }
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(); } }