Merge pull request #214 from jared-nishikawa/master
Added DisableCursor
This commit is contained in:
commit
d35b25061e
|
@ -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.
|
// CursorVisible returns the visibility status of the mouse cursor.
|
||||||
func (w *Window) CursorVisible() bool {
|
func (w *Window) CursorVisible() bool {
|
||||||
return w.cursorVisible
|
return w.cursorVisible
|
||||||
|
|
Loading…
Reference in New Issue