WaitingIndication

An indication for when the interactive experience is currently unavailable because of a long-lasting action (but probably be available soon).
Such an action may be waiting for resources, performing a long calculation, accessing I/O etc.

Props

  • active {boolean} - Should the waiting indication be visible

API

  • addShowHideActionPair(startAction {string} ,stopAction {string}, addonId {string}) - Defines a new pair of start/stop actions. These actions describe a long-lasting blocking action that triggers the waiting indication. The waiting indication will display as long as a pair is unclosed (that is, a start action is dispatched and its corresponding end action is yet to dispatch).
  • getShowHideActionPairs() - Returns a list of configured ShowHideActionPairs

Events

No events.

parentContainer

root

Plugin Options

No configurable options.

Notes

On init, this addon registers the ShowHideActionPair "PLAYER_WAITING"/"PLAYER_PLAYING" to display the WaitingIndication while the player is unavailable.

This addon doesn’t define a “show/hide” api, rather it relies on pairs of “start/stop” actions. This is so that even there are multiple long-lasting blocking actions happening, the indication is visible as long as at least one is still ongoing. IE if a “hide” API did exist, a user could accidentally hide indication even when a different blocking action was still taking place. The logic of using action pairs in the epic takes care of preventing this scenario.

More information on how this works in the addon epic here

Rate this page: X
Tell us more!