fwgl-0.1.4.0: Game engine

Safe HaskellNone
LanguageHaskell2010

FWGL.Input

Contents

Synopsis

Documentation

module FWGL.Key

FRP

keyUp :: Key -> SF (Input a) (Event ()) Source

Keyboard release.

keyDown :: Key -> SF (Input a) (Event ()) Source

Keyboard press.

key :: Key -> SF (Input a) (Event ()) Source

Keyboard down.

mouseDown :: MouseButton -> SF (Input a) (Event (Int, Int)) Source

Mouse press.

mouseUp :: MouseButton -> SF (Input a) (Event (Int, Int)) Source

Mouse release.

mouse :: MouseButton -> SF (Input a) (Event (Int, Int)) Source

Mouse down.

click :: SF (Input a) (Event (Int, Int)) Source

Left click.

mouseMove :: SF (Input a) (Event (Int, Int)) Source

Mouse move.

pointer :: SF (Input a) (Int, Int) Source

Pointer location in pixels.

resize :: SF (Input a) (Event (Int, Int)) Source

Windowframebuffercanvas/etc. resize.

size :: SF (Input a) (Int, Int) Source

Windowframebuffercanvas size.

custom :: SF (Input a) a Source

Custom input.

Raw

data Input a Source

The general input.

Constructors

Input 

data EventData Source

The data carried by an event. They're all together in the same structure because this is how it works in JavaScript.

Constructors

EventData 

Fields

dataFramebufferSize :: Maybe (Int, Int)
 
dataPointer :: Maybe (Int, Int)
 
dataButton :: Maybe MouseButton
 
dataKey :: Maybe Key
 
dataTime :: Double

The unit of time is unspecified, this is only used to determine the sequence of different events.