Safe Haskell | None |
---|---|
Language | Haskell2010 |
Game.LambdaHack.Client.UI.WidgetClient
Description
A set of widgets for UI clients.
- displayMore :: MonadClientUI m => ColorMode -> Msg -> m Bool
- displayYesNo :: MonadClientUI m => ColorMode -> Msg -> m Bool
- displayChoiceUI :: MonadClientUI m => Msg -> Overlay -> [KM] -> m (Either Slideshow KM)
- displayPush :: MonadClientUI m => Msg -> m ()
- describeMainKeys :: MonadClientUI m => m Msg
- promptToSlideshow :: MonadClientUI m => Msg -> m Slideshow
- overlayToSlideshow :: MonadClientUI m => Msg -> Overlay -> m Slideshow
- overlayToBlankSlideshow :: MonadClientUI m => Bool -> Msg -> Overlay -> m Slideshow
- animate :: MonadClientUI m => LevelId -> Animation -> m Frames
- fadeOutOrIn :: MonadClientUI m => Bool -> m ()
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 => Msg -> 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.
describeMainKeys :: MonadClientUI m => m Msg Source #
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.
overlayToBlankSlideshow :: MonadClientUI m => Bool -> Msg -> Overlay -> m Slideshow Source #
animate :: MonadClientUI m => LevelId -> Animation -> m Frames Source #
Render animations on top of the current screen frame.
fadeOutOrIn :: MonadClientUI m => Bool -> m () Source #