LambdaHack-0.11.0.1: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Client.UI.Content.Screen

Contents

- Internal operations

Description

The type of definitions of screen layout and features.

Synopsis

- data ScreenContent = ScreenContent {
  - rwidth :: X
  - rheight :: Y
  - rwebAddress :: String
  - rintroScreen :: ([String], [[String]])
  - rapplyVerbMap :: EnumMap (ContentSymbol ItemKind) Text
  - rFontFiles :: [(FilePath, ByteString)]
  }
- emptyScreenContent :: ScreenContent
- makeData :: RuleContent -> ScreenContent -> ScreenContent
- emptyScreenContentRaw :: ScreenContent
- validateSingle :: RuleContent -> ScreenContent -> [Text]

# Documentation

data ScreenContent Source #

Screen layout and features definition.

Warning: this type is not abstract, but its values should not be created ad hoc, even for unit tests, but should be constructed with `makeData`, which includes validation,

The `emptyScreenContent` is one such valid by construction value of this type. It's suitable for bootstrapping and for testing.

Constructors

ScreenContent |

Fields

- rwidth :: X

  screen width

- rheight :: Y

  screen height

- rwebAddress :: String

  an extra blurb line for the main menu

- rintroScreen :: ([String], [[String]])

  the intro screen (first help screen) text and the rest of the manual

- rapplyVerbMap :: EnumMap (ContentSymbol ItemKind) Text

  verbs to use for apply actions

- rFontFiles :: [(FilePath, ByteString)]

  embedded game-supplied font files

emptyScreenContent :: ScreenContent Source #

makeData :: RuleContent -> ScreenContent -> ScreenContent Source #

# Internal operations

emptyScreenContentRaw :: ScreenContent Source #

validateSingle :: RuleContent -> ScreenContent -> [Text] Source #

Catch invalid rule kind definitions.