Rehome launcher

This commit is contained in:
jgk
2021-05-25 18:03:35 +02:00
parent f737897b18
commit d5fed6c987
15 changed files with 280 additions and 222 deletions
+34 -32
View File
@@ -31,44 +31,46 @@ data KeyConfig = KeyConfig
deriving (Generic, Show)
data KeyConfigSDL = KeyConfigSDL
{ moveUpKey :: SDL.Scancode,
moveDownKey :: SDL.Scancode,
moveLeftKey :: SDL.Scancode,
moveRightKey :: SDL.Scancode,
pauseKey :: SDL.Scancode,
escapeKey :: SDL.Scancode,
dropItemKey :: SDL.Scancode,
toggleMapKey :: SDL.Scancode,
reloadKey :: SDL.Scancode,
testEventKey :: SDL.Scancode,
spaceActionKey :: SDL.Scancode,
rotateCameraPlusKey :: SDL.Scancode,
rotateCameraMinusKey :: SDL.Scancode,
zoomInKey :: SDL.Scancode,
zoomOutKey :: SDL.Scancode,
newMapKey :: SDL.Scancode
{ moveUpKey :: SDL.Scancode
, moveDownKey :: SDL.Scancode
, moveLeftKey :: SDL.Scancode
, moveRightKey :: SDL.Scancode
, pauseKey :: SDL.Scancode
, escapeKey :: SDL.Scancode
, dropItemKey :: SDL.Scancode
, toggleMapKey :: SDL.Scancode
, reloadKey :: SDL.Scancode
, testEventKey :: SDL.Scancode
, spaceActionKey :: SDL.Scancode
, rotateCameraPlusKey :: SDL.Scancode
, rotateCameraMinusKey :: SDL.Scancode
, zoomInKey :: SDL.Scancode
, zoomOutKey :: SDL.Scancode
, newMapKey :: SDL.Scancode
, modifierKey :: SDL.Scancode
}
deriving (Generic, Show)
defaultKeyConfigSDL :: KeyConfigSDL
defaultKeyConfigSDL =
KeyConfigSDL
{ moveUpKey = SDL.ScancodeW,
moveDownKey = SDL.ScancodeS,
moveLeftKey = SDL.ScancodeA,
moveRightKey = SDL.ScancodeD,
pauseKey = SDL.ScancodeP,
escapeKey = SDL.ScancodeEscape,
dropItemKey = SDL.ScancodeF,
toggleMapKey = SDL.ScancodeM,
reloadKey = SDL.ScancodeR,
testEventKey = SDL.ScancodeT,
spaceActionKey = SDL.ScancodeSpace,
rotateCameraPlusKey = SDL.ScancodeQ,
rotateCameraMinusKey = SDL.ScancodeE,
zoomInKey = SDL.ScancodeJ,
zoomOutKey = SDL.ScancodeK,
newMapKey = SDL.ScancodeN
{ moveUpKey = SDL.ScancodeW
, moveDownKey = SDL.ScancodeS
, moveLeftKey = SDL.ScancodeA
, moveRightKey = SDL.ScancodeD
, pauseKey = SDL.ScancodeP
, escapeKey = SDL.ScancodeEscape
, dropItemKey = SDL.ScancodeF
, toggleMapKey = SDL.ScancodeM
, reloadKey = SDL.ScancodeR
, testEventKey = SDL.ScancodeT
, spaceActionKey = SDL.ScancodeSpace
, rotateCameraPlusKey = SDL.ScancodeQ
, rotateCameraMinusKey = SDL.ScancodeE
, zoomInKey = SDL.ScancodeJ
, zoomOutKey = SDL.ScancodeK
, newMapKey = SDL.ScancodeN
, modifierKey = SDL.ScancodeCapsLock
}
--instance ToJSON KeyConfig where