#15 Basic input handling

This commit is contained in:
Tibo De Peuter 2022-12-14 22:20:44 +01:00
parent 9e5f22458c
commit cdd0c3989c
4 changed files with 70 additions and 7 deletions

View file

@ -7,6 +7,8 @@ module RPGEngine
import Game
import Render
import Input
import Graphics.Gloss (
Color(..)
, white
@ -23,10 +25,6 @@ winDimensions = (1280, 720)
winOffsets :: (Int, Int)
winOffsets = (0, 0)
-- Game background color
bgColor :: Color
bgColor = white
----------------------------------------------------------------------
-- This is the gameloop.
@ -34,6 +32,6 @@ bgColor = white
playRPGEngine :: String -> Int -> IO()
playRPGEngine title fps = do
play window bgColor fps initGame render handleInputs step
where window = initWindow title winDimensions winOffsets
step _ g = g -- TODO Do something with step?
handleInputs _ g = g -- TODO Implement inputHanlders
where window = initWindow title winDimensions winOffsets
step _ g = g -- TODO Do something with step?
handleInputs = handleAllInput