Merge pull request #2 from RobLoach/escape

Close the window on escape
This commit is contained in:
Jean-André Santoni 2018-04-21 11:52:09 +07:00 committed by GitHub
commit 2d6cac677d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -247,6 +247,11 @@ func coreInputPoll() {
for k, v := range binds {
joy[v] = (window.GetKey(k) == glfw.Press)
}
// Close the window when the user hits the Escape key.
if (window.GetKey(glfw.KeyEscape) == glfw.Press) {
window.SetShouldClose(true)
}
}
//export coreInputState