Added DisableCursor

This commit is contained in:
Jared 2020-01-08 22:24:48 -07:00
parent e51d4a6676
commit 93a24aa6df
1 changed files with 8 additions and 0 deletions

View File

@ -369,6 +369,14 @@ func (w *Window) SetCursorVisible(visible bool) {
})
}
// DisableCursor hides the cursor and provides unlimited virtual cursor movement
func (w *Window) DisableCursor() {
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