#5 Render inventory when pressing i
This commit is contained in:
parent
f529fc5237
commit
d0302c3156
9 changed files with 76 additions and 52 deletions
|
@ -6,7 +6,7 @@ import RPGEngine.Input.Core (InputHandler, composeInputHandlers, handleKey, List
|
|||
|
||||
import RPGEngine.Data (Game (..), State (..), Direction (..))
|
||||
import Graphics.Gloss.Interface.IO.Game (Key(..))
|
||||
import Graphics.Gloss.Interface.IO.Interact (SpecialKey(..))
|
||||
import Graphics.Gloss.Interface.IO.Interact (SpecialKey(..), KeyState(..))
|
||||
import RPGEngine.Config (levelFolder)
|
||||
import RPGEngine.Parse (parse)
|
||||
|
||||
|
@ -14,10 +14,10 @@ import RPGEngine.Parse (parse)
|
|||
|
||||
handleInputLevelSelection :: InputHandler Game
|
||||
handleInputLevelSelection = composeInputHandlers [
|
||||
handleKey (SpecialKey KeySpace) selectLevel,
|
||||
handleKey (SpecialKey KeySpace) Down selectLevel,
|
||||
|
||||
handleKey (SpecialKey KeyUp) $ moveSelector North,
|
||||
handleKey (SpecialKey KeyDown) $ moveSelector South
|
||||
handleKey (SpecialKey KeyUp) Down $ moveSelector North,
|
||||
handleKey (SpecialKey KeyDown) Down $ moveSelector South
|
||||
]
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
|
Reference in a new issue