Safe Haskell | None |
---|---|
Language | Haskell2010 |
Slideshows.
Synopsis
- type KYX = (Either [KM] SlotChar, (Y, X, X))
- type OKX = (Overlay, [KYX])
- data Slideshow
- emptySlideshow :: Slideshow
- unsnoc :: Slideshow -> Maybe (Slideshow, OKX)
- toSlideshow :: [OKX] -> Slideshow
- menuToSlideshow :: OKX -> Slideshow
- wrapOKX :: Y -> X -> X -> [(KM, String)] -> OKX
- splitOverlay :: X -> Y -> Report -> [KM] -> OKX -> Slideshow
- splitOKX :: X -> Y -> AttrLine -> [KM] -> OKX -> [OKX]
- highSlideshow :: X -> Y -> ScoreTable -> Int -> Text -> TimeZone -> Slideshow
- moreMsg :: String
- endMsg :: String
- keysOKX :: Y -> X -> X -> [KM] -> OKX
- showTable :: TimeZone -> Int -> ScoreTable -> Int -> Int -> [AttrLine]
- showNearbyScores :: TimeZone -> Int -> ScoreTable -> Int -> [[AttrLine]]
Documentation
type KYX = (Either [KM] SlotChar, (Y, X, X)) Source #
A key or an item slot label at a given position on the screen.
type OKX = (Overlay, [KYX]) Source #
An Overlay of text with an associated list of keys or slots that activated when the specified screen position is pointed at. The list should be sorted wrt rows and then columns.
A list of active screenfulls to be shown one after another. Each screenful has an independent numbering of rows and columns.
toSlideshow :: [OKX] -> Slideshow Source #
menuToSlideshow :: OKX -> Slideshow Source #
:: X | width of the display area |
-> Y | height of the display area |
-> ScoreTable | current score table |
-> Int | position of the current score in the table |
-> Text | the name of the game mode |
-> TimeZone | the timezone where the game is run |
-> Slideshow |
Generate a slideshow with the current and previous scores.
Internal operations
showTable :: TimeZone -> Int -> ScoreTable -> Int -> Int -> [AttrLine] Source #
Show a screenful of the high scores table.
Parameter entries
is the number of (3-line) scores to be shown.
showNearbyScores :: TimeZone -> Int -> ScoreTable -> Int -> [[AttrLine]] Source #
Produce a couple of renderings of the high scores table.