swarm-0.6.0.0: 2D resource gathering game with programmable robots
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.TUI.Model.Popup

Synopsis

Popup types

data Popup Source #

Different types of popups that can be displayed to the player.

Constructors

AchievementPopup CategorizedAchievement 
RecipesPopup 
CommandsPopup [Const] 

Popup state

data PopupState Source #

State to track pending popup queue as well as any popup which is currently being displayed.

initPopupState :: PopupState Source #

Initial, empty popup state.

addPopup :: Popup -> PopupState -> PopupState Source #

Add a popup to the end of the queue.

Popup animation

popupFrames :: Int Source #

The number of frames for which to display a popup.

progressPopups :: MonadState PopupState m => m Bool Source #

Progress the popup state by one frame: pull the next popup from the queue if there is no current popup or the current popup has reached the max frame count; otherwise just increment the frame count of the current popup.

Return True if something was updated that might require redrawing the UI.