LambdaHack-0.2.1: A roguelike game engine in early and very active development

Safe HaskellSafe-Infered

Game.LambdaHack.Binding

Description

Generic binding of keys to commands, procesing macros, printing command help. No operation in this module involves the State or Action type.

Synopsis

Documentation

data Binding a Source

Bindings and other information about player commands.

Constructors

Binding 

Fields

kcmd :: Map (Key, Modifier) (String, Bool, a)

binding keys to commands

kmacro :: Map Key Key

macro map

kmajor :: [Key]

major, most often used, commands

kdir :: [(Key, Modifier)]

direction keys for moving and running

macroKey :: [(String, String)] -> Map Key KeySource

Produce the macro map from a macro association list taken from the config file. Macros cannot depend on each other. The map is fully evaluated to catch errors in macro definitions early.

keyHelp :: Binding a -> [Overlay]Source

Produce a set of help screens from the key bindings.