Ejemplo n.º 1
0
 /// <summary>
 /// Displays the modal panel with the settings from inspector
 /// or an instanced reference of this class.
 /// </summary>
 public void DisplayModalPanel()
 {
     ModalPanel.ModalButton[] mButtons = new ModalPanel.ModalButton[buttons.Length];
     for (int i = 0; i < buttons.Length; i++)
     {
         mButtons[i] = new ModalPanel.ModalButton
         {
             label  = buttons[i].Label,
             action = buttons[i].OnClick.Invoke
         };
     }
     ModalPanel.Data panelData = new ModalPanel.Data
                                 (
         title,
         message,
         mButtons
                                 );
     if (sprite != null)
     {
         panelData.sprite = sprite;
     }
     modalPanel.Display(panelData);
 }
 private void Display(string textToDisplay)
 {
     modalPanel.Display(textToDisplay);
 }