LambdaHack-0.10.2.0: A game engine library for tactical squad ASCII roguelike dungeon crawlers
Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.UI.Overlay

Description

Screen overlays.

Synopsis

AttrString

type AttrString = [AttrCharW32] Source #

String of colourful text. End of line characters permitted.

AttrLine

data AttrLine Source #

Line of colourful text. End of line characters forbidden.

Instances

Instances details
Eq AttrLine Source # 
Instance details

Defined in Game.LambdaHack.Client.UI.Overlay

Show AttrLine Source # 
Instance details

Defined in Game.LambdaHack.Client.UI.Overlay

splitAttrString :: Int -> Int -> AttrString -> [AttrLine] Source #

Split a string into lines. Avoids breaking the line at a character other than space. Remove space characters from the starts and ends of created lines. Newlines are respected.

Note that we only split wrt White space, nothing else, and the width, in the first argument, is calculated in characters, not in UI (mono font) coordinates, so that taking and dropping characters is performed correctly.

Overlay

type Overlay = [(PointUI, AttrLine)] Source #

A series of screen lines with start positions at which they should be overlayed over the base frame or a blank screen, depending on context. The position point is represented as in integer that is an index into the frame character array. The lines either fit the width of the screen or are intended for truncation when displayed. The start positions of lines may fall outside the length of the screen, too, unlike in SingleFrame. Then they are simply not shown.

Internal operations