Merge pull request from jared-nishikawa/master

Added DisableCursor
This commit is contained in:
Alex R. Delp 2020-05-06 17:02:32 -07:00 committed by GitHub
commit d35b25061e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions
pixelgl

View File

@ -374,6 +374,15 @@ func (w *Window) SetCursorVisible(visible bool) {
})
}
// SetCursorDisabled hides the cursor and provides unlimited virtual cursor movement
// make cursor visible using SetCursorVisible
func (w *Window) SetCursorDisabled() {
w.cursorVisible = false
mainthread.Call(func() {
w.window.SetInputMode(glfw.CursorMode, glfw.CursorDisabled)
})
}
// CursorVisible returns the visibility status of the mouse cursor.
func (w *Window) CursorVisible() bool {
return w.cursorVisible