Safe Haskell | None |
---|---|
Language | Haskell2010 |
Slideshows.
Synopsis
- data DisplayFont
- isSquareFont :: DisplayFont -> Bool
- isMonoFont :: DisplayFont -> Bool
- type FontOverlayMap = EnumMap DisplayFont Overlay
- data FontSetup = FontSetup {}
- multiFontSetup :: FontSetup
- monoFontSetup :: FontSetup
- singleFontSetup :: FontSetup
- textSize :: DisplayFont -> [a] -> Int
- data ButtonWidth = ButtonWidth {}
- type KYX = (Either [KM] SlotChar, (PointUI, ButtonWidth))
- type OKX = (FontOverlayMap, [KYX])
- data Slideshow
- emptySlideshow :: Slideshow
- unsnoc :: Slideshow -> Maybe (Slideshow, OKX)
- toSlideshow :: FontSetup -> [OKX] -> Slideshow
- attrLinesToFontMap :: Int -> [(DisplayFont, [AttrLine])] -> FontOverlayMap
- maxYofOverlay :: Overlay -> Int
- menuToSlideshow :: OKX -> Slideshow
- wrapOKX :: DisplayFont -> Int -> Int -> Int -> [(KM, String)] -> (Overlay, [KYX])
- splitOverlay :: FontSetup -> Bool -> Int -> Int -> Int -> Report -> [KM] -> OKX -> Slideshow
- splitOKX :: FontSetup -> Bool -> Int -> Int -> Int -> AttrString -> [KM] -> OKX -> [OKX]
- highSlideshow :: FontSetup -> Int -> Int -> ScoreTable -> Int -> Text -> TimeZone -> Slideshow
- moreMsg :: String
- endMsg :: String
- keysOKX :: DisplayFont -> Int -> Int -> Int -> [KM] -> (Overlay, [KYX])
- showTable :: TimeZone -> Int -> ScoreTable -> Int -> Int -> [AttrLine]
- showNearbyScores :: TimeZone -> Int -> ScoreTable -> Int -> [[AttrLine]]
Documentation
data DisplayFont Source #
Instances
Enum DisplayFont Source # | |
Defined in Game.LambdaHack.Client.UI.Slideshow succ :: DisplayFont -> DisplayFont # pred :: DisplayFont -> DisplayFont # toEnum :: Int -> DisplayFont # fromEnum :: DisplayFont -> Int # enumFrom :: DisplayFont -> [DisplayFont] # enumFromThen :: DisplayFont -> DisplayFont -> [DisplayFont] # enumFromTo :: DisplayFont -> DisplayFont -> [DisplayFont] # enumFromThenTo :: DisplayFont -> DisplayFont -> DisplayFont -> [DisplayFont] # | |
Eq DisplayFont Source # | |
Defined in Game.LambdaHack.Client.UI.Slideshow (==) :: DisplayFont -> DisplayFont -> Bool # (/=) :: DisplayFont -> DisplayFont -> Bool # | |
Show DisplayFont Source # | |
Defined in Game.LambdaHack.Client.UI.Slideshow showsPrec :: Int -> DisplayFont -> ShowS # show :: DisplayFont -> String # showList :: [DisplayFont] -> ShowS # |
isSquareFont :: DisplayFont -> Bool Source #
isMonoFont :: DisplayFont -> Bool Source #
type FontOverlayMap = EnumMap DisplayFont Overlay Source #
textSize :: DisplayFont -> [a] -> Int Source #
data ButtonWidth Source #
Width of on-screen button text, expressed in characters, and so UI (mono font) width is deduced from the used font.
Instances
Eq ButtonWidth Source # | |
Defined in Game.LambdaHack.Client.UI.Slideshow (==) :: ButtonWidth -> ButtonWidth -> Bool # (/=) :: ButtonWidth -> ButtonWidth -> Bool # | |
Show ButtonWidth Source # | |
Defined in Game.LambdaHack.Client.UI.Slideshow showsPrec :: Int -> ButtonWidth -> ShowS # show :: ButtonWidth -> String # showList :: [ButtonWidth] -> ShowS # |
type KYX = (Either [KM] SlotChar, (PointUI, ButtonWidth)) Source #
A key or an item slot label at a given position on the screen.
type OKX = (FontOverlayMap, [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.
attrLinesToFontMap :: Int -> [(DisplayFont, [AttrLine])] -> FontOverlayMap Source #
maxYofOverlay :: Overlay -> Int Source #
menuToSlideshow :: OKX -> Slideshow Source #
splitOverlay :: FontSetup -> Bool -> Int -> Int -> Int -> Report -> [KM] -> OKX -> Slideshow Source #
:: FontSetup | |
-> Int | width of the display area |
-> Int | 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.