Safe Haskell | None |
---|
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 => m ()
- displayPushIfLid :: MonadClientUI m => LevelId -> m ()
- promptToSlideshow :: MonadClientUI m => Msg -> m Slideshow
- overlayToSlideshow :: MonadClientUI m => Msg -> Overlay -> m Slideshow
- overlayToBlankSlideshow :: MonadClientUI m => Msg -> Overlay -> m Slideshow
- animate :: MonadClientUI m => LevelId -> Animation -> m Frames
- fadeOutOrIn :: MonadClientUI m => Bool -> m ()
Documentation
displayMore :: MonadClientUI m => ColorMode -> Msg -> m BoolSource
Display a message with a -more-
prompt.
Return value indicates if the player tried to cancel/escape.
displayYesNo :: MonadClientUI m => ColorMode -> Msg -> m BoolSource
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.
displayPushIfLid :: MonadClientUI m => LevelId -> m ()Source
promptToSlideshow :: MonadClientUI m => Msg -> m SlideshowSource
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 SlideshowSource
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 => Msg -> Overlay -> m SlideshowSource
animate :: MonadClientUI m => LevelId -> Animation -> m FramesSource
Render animations on top of the current screen frame.
fadeOutOrIn :: MonadClientUI m => Bool -> m ()Source