Learn / Documentation / Script Reference / UIPopupManager
Manual

UIPopupManager

class in Doozy.Engine.UI / Inherits from MonoBehaviour

Description

The UIPopupManager class is responsible for showing UIPopups instantly or in a sequence, by putting them in a popup queue.
See Also: UIPopup

Static Properties

  • public static UIPopupManager Instance – Returns a reference to the UIPopupManager in the scene. If one does not exist, it gets created

  • public static UIPopup CurrentVisibleQueuePopup – Holds the reference to the currently visible UIPopup (that is also in the PopupQueue). Note that there can also be other visible UIPopups that were not added to the PopupQueue. If no popup from the PopupQueue is visible, it returns null

  • public static UIPopupDatabase PopupDatabase – Direct reference to the UIPopupDatabase that holds all the UIPopup prefab references and their popup names

  • public static readonly List<UIPopupQueueData> PopupQueue – List of UIPopupQueueData entries that holds all the info for the UIPopups that await to be shown in a sequential manner

  • public static bool QueueIsEmpty – Returns TRUE if there are no UIPopups, in the PopupQueue, awaiting to be shown

Static Methods

  • public static void AddToQueue(UIPopup popup, bool instantAction = false) – Adds the given UIPopup the the PopupQueue

  • public static void ClearQueue(bool instantAction = false) – Hides the CurrentVisibleQueuePopup (if visible) and clears the PopupQueue

  • public static UIPopup GetPopup(string popupName) – Looks in the UIPopupManager PopupsDatabase for an UIPopup prefab linked to the given popup name. If found, it instantiates a clone of it and returns a reference to it. Otherwise it returns null

  • private static UIPopupQueueData GetPopupData(string popupName) – Retrieves the first UIPopupQueueData registered in the PopupQueue with the given popup name

  • private static UIPopupQueueData GetPopupData(UIPopup popup) – Retrieves the first UIPopupQueueData registered in the PopupQueue with the giver popup reference

  • public static bool IsInQueue(string popupName) – Returns TRUE if at least one UIPopup with the given popup name is found in the PopupQueue

  • public static bool IsInQueue(UIPopup popup) – Returns TRUE if at least one entry of the given popup is found in the PopupQueue

  • public static void RemoveFromQueue(string popupName, bool showNextInQueue = true) – Removes the first UIPopup registered with the given popupName from the PopupQueue (if it exists)

  • public static void RemoveFromQueue(UIPopup popup, bool showNextInQueue = true) – Removes the given popup reference from the PopupQueue (if it exists)

  • public static void ShowNextInQueue() – Shows the next popup in the PopupQueue (if any)

  • public static void ShowPopup(UIPopup popup, bool addToPopupQueue, bool instantAction, string targetCanvasName) – Shows the given popup with the given settings

  • public static void ShowPopup(UIPopup popup, bool addToPopupQueue, bool instantAction) – Shows the given popup with the given settings

  • public static UIPopup ShowPopup(string popupName, bool addToPopupQueue, bool instantAction, string targetCanvasName) – Shows the given popup with the given settings and returns a reference to it

  • public static UIPopup ShowPopup(string popupName, bool addToPopupQueue, bool instantAction) – Shows the given popup with the given settings and returns a reference to it