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; }
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); }
public void updateContent(PopupOptions options) { okButtonDelegate = options.okButtonDelegate; }