Skip to main content

PopupManager.PopupConfig

A private class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Private queued popup in PopupManager: the board prefab to use and a callback to set it up. Returned to callers as IPopupConfig.

Constructors​

MemberWhat it is
PopupConfig(IPopupBoard prefab, Action<IPopupBoard> onSpawn)Creates a PopupManager.PopupConfig from prefab and onSpawn.

Fields​

1 private and internal field
MemberWhat it is
private readonly Action<IPopupBoard> onSpawnCallback run on the new board, for example to set its title and message.

Properties​

MemberWhat it is
bool IsCancelled { get; private set; }Whether Cancel was called.
IPopupBoard Prefab { get; private set; }The board prefab, or null to use the manager's default.

Methods​

MemberWhat it is
void Cancel()Marks the popup cancelled so the queue skips it. Has no effect once shown.
void SetPrefab(IPopupBoard prefab)Changes the board prefab before it is shown.
IPopupBoard Spawn(Transform parent, IPopupBoard defaultPrefab, Action<IPopupBoard> onClosed)Makes the board under a parent, hooks its Closed event and runs the setup callback.