swarm-0.7.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellNone
LanguageHaskell2010

Swarm.TUI.View.Util

Description

 
Synopsis

Documentation

data ScenarioSeriesContext Source #

Constructors

ScenarioSeriesContext 

Fields

generateModal :: ScenarioState -> MidScenarioModalType -> 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.

drawLabeledTerrainSwatch :: TerrainMap -> TerrainType -> Widget Name Source #

maxModalWindowWidth :: Int Source #

Width cap for modal and error message windows

curMenuName :: Menu -> 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.

drawLabelledEntityName :: Entity -> Widget n Source #

Draw the name of an entity, labelled with its visual representation as a cell in the world.

bindingText :: KeyConfig SwarmEvent -> SwarmEvent -> Text Source #

Render the keybinding bound to a specific event.