Example #1
0
 /// <summary>
 /// Takes a popup and a method for state change before displaying. Returns the response as a callback and takes an optional zone ID
 /// </summary>
 public async static void ModifyStateAndDisplay <T, K>(Popup <T, K> popup, Action <T> modification, Action <K> resultCallback, string zoneID = DEFAULT) where T : PopupState where K : PopupResponse =>
 resultCallback?.Invoke(await ModifyStateAndDisplay(popup, modification, zoneID));
Example #2
0
 /// <summary>
 /// Takes a popup, it's state and displays it before returning the response as a callback. Optionally takes the zone ID too.
 /// </summary>
 public async static void SetStateAndDisplay <T, K>(Popup <T, K> popup, T state, Action <K> resultCallback, string zoneID = DEFAULT) where T : PopupState where K : PopupResponse =>
 resultCallback?.Invoke(await SetStateAndDisplay(popup, state, zoneID));