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

Safe HaskellNone

Game.LambdaHack.Action.Frontend

Contents

Description

Display game data on the screen and receive user input using one of the available raw frontends and derived operations.

Synopsis

Re-exported part of the raw frontend

type FrontendSession = ()Source

No session data needs to be maintained by this frontend.

startup :: String -> (FrontendSession -> IO ()) -> IO ()Source

Starts the main program loop using the frontend input and output.

frontendName :: StringSource

The name of the frontend.

nextEvent :: FrontendSession -> Maybe Bool -> IO (Key, Modifier)Source

Input key via the frontend.

Derived operations

displayFrame :: FrontendSession -> Bool -> Maybe SingleFrame -> IO ()Source

Push a frame or a single frame's worth of delay to the frame queue.

promptGetKey :: FrontendSession -> [(Key, Modifier)] -> SingleFrame -> IO (Key, Modifier)Source

Display a prompt, wait for any of the specified keys (for any key, if the list is empty). Repeat if an unexpected key received.