Ejemplo n.º 1
0
        /// <summary>
        /// Shows the the popup if it's possible with given data
        /// </summary>
        /// <param name="popupData">Data that will be used to display popup</param>
        public void Show(PopupData popupData)
        {
            if (!CanBeShown)
            {
                popupData.InvokeCancelCallback();
                return;
            }

            currentData = popupData;
            uiText.text = currentData.Text;
            Show();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Cancels the operation and closes the popup
 /// </summary>
 public void Cancel()
 {
     Hide();
     currentData.InvokeCancelCallback();
     currentData = null;
 }