Ejemplo n.º 1
0
 public ShowPopupEvent(PopupOptions buttonOptions, string popupTitleKey, string popupContentKey, Action <PopupResult> onResultCallback, bool cancelOnBackgroundClick = false, PopupSize size = PopupSize.W800H600)
 {
     ButtonOptions               = buttonOptions;
     PopupTitleKey               = popupTitleKey;
     PopupContentKey             = popupContentKey;
     ResultCallback              = onResultCallback;
     Size                        = size;
     CancelOnBackgroundAvailable = cancelOnBackgroundClick;
 }
Ejemplo n.º 2
0
    public static Popup show(PopupOptions options)
    {
        if (prefab == null)
        {
            prefab = Resources.Load("Popup") as GameObject;
        }

        GameObject popupPrefab = Instantiate(prefab) as GameObject;
        Popup      popup       = popupPrefab.GetComponent <Popup>();

        popup.updateContent(options);

        return(popup);
    }
Ejemplo n.º 3
0
 public void updateContent(PopupOptions options)
 {
     okButtonDelegate = options.okButtonDelegate;
 }