aztecs-0.8.0: A modular game engine and Entity-Component-System (ECS) for Haskell.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Aztecs.Input

Synopsis

Documentation

data Key Source #

Instances

Instances details
Bounded Key Source # 
Instance details

Defined in Aztecs.Input

Methods

minBound :: Key #

maxBound :: Key #

Enum Key Source # 
Instance details

Defined in Aztecs.Input

Methods

succ :: Key -> Key #

pred :: Key -> Key #

toEnum :: Int -> Key #

fromEnum :: Key -> Int #

enumFrom :: Key -> [Key] #

enumFromThen :: Key -> Key -> [Key] #

enumFromTo :: Key -> Key -> [Key] #

enumFromThenTo :: Key -> Key -> Key -> [Key] #

Generic Key Source # 
Instance details

Defined in Aztecs.Input

Associated Types

type Rep Key :: Type -> Type #

Methods

from :: Key -> Rep Key x #

to :: Rep Key x -> Key #

Show Key Source # 
Instance details

Defined in Aztecs.Input

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

NFData Key Source # 
Instance details

Defined in Aztecs.Input

Methods

rnf :: Key -> () #

Eq Key Source # 
Instance details

Defined in Aztecs.Input

Methods

(==) :: Key -> Key -> Bool #

(/=) :: Key -> Key -> Bool #

Ord Key Source # 
Instance details

Defined in Aztecs.Input

Methods

compare :: Key -> Key -> Ordering #

(<) :: Key -> Key -> Bool #

(<=) :: Key -> Key -> Bool #

(>) :: Key -> Key -> Bool #

(>=) :: Key -> Key -> Bool #

max :: Key -> Key -> Key #

min :: Key -> Key -> Key #

type Rep Key Source # 
Instance details

Defined in Aztecs.Input

type Rep Key = D1 ('MetaData "Key" "Aztecs.Input" "aztecs-0.8.0-5YWGoxTs0Vw9iciqZAe9GO" 'False) ((((((C1 ('MetaCons "KeyA" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyB" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "KeyC" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyD" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyE" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "KeyF" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyG" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyH" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "KeyI" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyJ" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyK" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "KeyL" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyM" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyN" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "KeyO" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyQ" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "KeyR" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyT" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "KeyU" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyV" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyW" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "KeyX" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyY" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyZ" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Key0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Key1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key2" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Key3" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Key4" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key5" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Key6" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Key7" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key8" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "Key9" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyF1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyF2" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "KeyF3" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyF4" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyF5" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "KeyF6" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyF7" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyF8" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "KeyF9" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyF10" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyF11" 'PrefixI 'False) (U1 :: Type -> Type))))))) :+: (((((C1 ('MetaCons "KeyF12" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyEscape" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyEnter" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "KeySpace" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyBackspace" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyTab" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "KeyCapsLock" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyShift" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyCtrl" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "KeyAlt" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyLeft" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyRight" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "KeyUp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyDown" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyHome" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "KeyEnd" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyPageUp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyPageDown" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "KeyInsert" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyDelete" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyMinus" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "KeyEquals" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyBracketLeft" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyBracketRight" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "KeyBackslash" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeySemicolon" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyComma" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "KeyPeriod" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeySlash" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyNumLock" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "KeyNumpad0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyNumpad1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyNumpad2" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "KeyNumpad3" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyNumpad4" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyNumpad5" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "KeyNumpad6" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyNumpad7" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyNumpad8" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "KeyNumpad9" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyNumpadDivide" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyNumpadMultiply" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "KeyNumpadMinus" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyNumpadPlus" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyNumpadEnter" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "KeyNumpadPeriod" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeySuper" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyMenu" 'PrefixI 'False) (U1 :: Type -> Type))))))))

data InputMotion Source #

Constructors

Pressed 
Released 

Instances

Instances details
Generic InputMotion Source # 
Instance details

Defined in Aztecs.Input

Associated Types

type Rep InputMotion :: Type -> Type #

Show InputMotion Source # 
Instance details

Defined in Aztecs.Input

NFData InputMotion Source # 
Instance details

Defined in Aztecs.Input

Methods

rnf :: InputMotion -> () #

Eq InputMotion Source # 
Instance details

Defined in Aztecs.Input

type Rep InputMotion Source # 
Instance details

Defined in Aztecs.Input

type Rep InputMotion = D1 ('MetaData "InputMotion" "Aztecs.Input" "aztecs-0.8.0-5YWGoxTs0Vw9iciqZAe9GO" 'False) (C1 ('MetaCons "Pressed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Released" 'PrefixI 'False) (U1 :: Type -> Type))

data KeyboardInput Source #

Keyboard input component.

Constructors

KeyboardInput 

Fields

Instances

Instances details
Component KeyboardInput Source # 
Instance details

Defined in Aztecs.Input

Associated Types

type StorageT KeyboardInput Source #

Generic KeyboardInput Source # 
Instance details

Defined in Aztecs.Input

Associated Types

type Rep KeyboardInput :: Type -> Type #

Show KeyboardInput Source # 
Instance details

Defined in Aztecs.Input

NFData KeyboardInput Source # 
Instance details

Defined in Aztecs.Input

Methods

rnf :: KeyboardInput -> () #

type StorageT KeyboardInput Source # 
Instance details

Defined in Aztecs.Input

type Rep KeyboardInput Source # 
Instance details

Defined in Aztecs.Input

type Rep KeyboardInput = D1 ('MetaData "KeyboardInput" "Aztecs.Input" "aztecs-0.8.0-5YWGoxTs0Vw9iciqZAe9GO" 'False) (C1 ('MetaCons "KeyboardInput" 'PrefixI 'True) (S1 ('MetaSel ('Just "keyboardEvents") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Key InputMotion)) :*: S1 ('MetaSel ('Just "keyboardPressed") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set Key))))

isKeyPressed :: Key -> KeyboardInput -> Bool Source #

True if this key is currently pressed.

wasKeyPressed :: Key -> KeyboardInput -> Bool Source #

True if this key was pressed this frame.

wasKeyReleased :: Key -> KeyboardInput -> Bool Source #

True if this key was released this frame.

data MouseButton Source #

Constructors

ButtonLeft 
ButtonMiddle 
ButtonRight 
ButtonX1 
ButtonX2 
ButtonExtra !Int

An unknown mouse button.

Instances

Instances details
Generic MouseButton Source # 
Instance details

Defined in Aztecs.Input

Associated Types

type Rep MouseButton :: Type -> Type #

Show MouseButton Source # 
Instance details

Defined in Aztecs.Input

NFData MouseButton Source # 
Instance details

Defined in Aztecs.Input

Methods

rnf :: MouseButton -> () #

Eq MouseButton Source # 
Instance details

Defined in Aztecs.Input

Ord MouseButton Source # 
Instance details

Defined in Aztecs.Input

type Rep MouseButton Source # 
Instance details

Defined in Aztecs.Input

type Rep MouseButton = D1 ('MetaData "MouseButton" "Aztecs.Input" "aztecs-0.8.0-5YWGoxTs0Vw9iciqZAe9GO" 'False) ((C1 ('MetaCons "ButtonLeft" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ButtonMiddle" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ButtonRight" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ButtonX1" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ButtonX2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ButtonExtra" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)))))

data MouseInput Source #

Mouse input component.

Constructors

MouseInput 

Fields

Instances

Instances details
Component MouseInput Source # 
Instance details

Defined in Aztecs.Input

Associated Types

type StorageT MouseInput Source #

Generic MouseInput Source # 
Instance details

Defined in Aztecs.Input

Associated Types

type Rep MouseInput :: Type -> Type #

Show MouseInput Source # 
Instance details

Defined in Aztecs.Input

NFData MouseInput Source # 
Instance details

Defined in Aztecs.Input

Methods

rnf :: MouseInput -> () #

type StorageT MouseInput Source # 
Instance details

Defined in Aztecs.Input

type Rep MouseInput Source # 
Instance details

Defined in Aztecs.Input

type Rep MouseInput = D1 ('MetaData "MouseInput" "Aztecs.Input" "aztecs-0.8.0-5YWGoxTs0Vw9iciqZAe9GO" 'False) (C1 ('MetaCons "MouseInput" 'PrefixI 'True) (S1 ('MetaSel ('Just "mousePosition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Point V2 Int)) :*: (S1 ('MetaSel ('Just "mouseOffset") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (V2 Int)) :*: S1 ('MetaSel ('Just "mouseButtons") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map MouseButton InputMotion)))))