LambdaHack-0.2.14: A roguelike game engine in early development

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.UI.WidgetClient

Description

A set of widgets for UI clients.

Synopsis

Documentation

displayMore :: MonadClientUI m => ColorMode -> Msg -> m Bool Source

Display a message with a -more- prompt. Return value indicates if the player tried to cancel/escape.

displayYesNo :: MonadClientUI m => ColorMode -> Msg -> m Bool Source

Print a yes/no question and return the player's answer. Use black and white colours to turn player's attention to the choice.

displayChoiceUI :: MonadClientUI m => Msg -> Overlay -> [KM] -> m (Either Slideshow KM) Source

Print a prompt and an overlay and wait for a player keypress. If many overlays, scroll screenfuls with SPACE. Do not wrap screenfuls (in some menus ? cycles views, so the user can restart from the top).

displayPush :: MonadClientUI m => m () Source

Push the frame depicting the current level to the frame queue. Only one screenful of the report is shown, the rest is ignored.

promptToSlideshow :: MonadClientUI m => Msg -> m Slideshow Source

The prompt is shown after the current message, but not added to history. This is useful, e.g., in targeting mode, not to spam history.

overlayToSlideshow :: MonadClientUI m => Msg -> Overlay -> m Slideshow Source

The prompt is shown after the current message at the top of each slide. Together they may take more than one line. The prompt is not added to history. The portions of overlay that fit on the the rest of the screen are displayed below. As many slides as needed are shown.

animate :: MonadClientUI m => LevelId -> Animation -> m Frames Source

Render animations on top of the current screen frame.