swarm-0.5.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.TUI.View.Util

Description

 
Synopsis

Documentation

generateModal :: AppState -> ModalType -> Modal Source #

Generate a fresh modal window of the requested type.

drawType :: Polytype -> Widget Name Source #

Render the type of the current REPL input to be shown to the user.

drawMarkdown :: Document Syntax -> Widget Name Source #

Draw markdown document with simple codebolditalic attributes.

TODO: #574 Code blocks should probably be handled separately.

maxModalWindowWidth :: Int Source #

Width cap for modal and error message windows

curMenuName :: AppState -> Maybe Text Source #

Get the name of the current New Game menu.

displayParagraphs :: [Text] -> Widget Name Source #

Display a list of text-wrapped paragraphs with one blank line after each.

layoutParagraphs :: [Widget Name] -> Widget Name Source #

Display a list of paragraphs with one blank line after each.

For the common case of `[Text]` use displayParagraphs.

data EllipsisSide Source #

Constructors

Beginning 
End 

maybeScroll :: (Ord n, Show n) => n -> Widget n -> Widget n Source #

Make a widget scrolling if it is bigger than the available vertical space. Thanks to jtdaugherty for this code.