-
-
Save bananu7/03e1dc77a945c5ad1f44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
runGlisha loadFn drawFn callbacks = do | |
window <- glishaInit callbacks | |
userState <- loadFn | |
G.setKeyCallback window $ Just $ \window key scancode action mods -> do | |
when (action == G.KeyState'Pressed) (onKeyDown callbacks $ key) | |
when (action == G.KeyState'Released) (onKeyUp callbacks $ key) | |
glishaLoop window drawFn userState | |
glishaSuccessfulExit window |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment