Beispiel #1
0
Datei: glfw.go Projekt: maun/glfw
func SetCursorPos(window Window, x, y int) {
	C.glfwSetCursorPos(C.GLFWwindow(window), C.int(x), C.int(y))
}
Beispiel #2
0
// SetCursorPos sets the position of the cursor. The specified window must
// be focused. If the window does not have focus when this function is called,
// it fails silently.
//
// If the cursor is disabled (with CursorDisabled) then the cursor position is
// unbounded and limited only by the minimum and maximum values of a double.
func (w *Window) SetCursorPos(xpos, ypos float64) {
	C.glfwSetCursorPos(w.data, C.double(xpos), C.double(ypos))
	panicError()
}
Beispiel #3
0
//SetCursorPosition sets the position of the cursor. The specified window must
//be focused. If the window does not have focus when this function is called,
//it fails silently.
//
//If the cursor is disabled (with CursorDisabled) then the cursor position is
//unbounded and limited only by the minimum and maximum values of a double.
func (w *Window) SetCursorPosition(xpos, ypos float64) {
	C.glfwSetCursorPos(w.data, C.double(xpos), C.double(ypos))
}