Exemplo n.º 1
0
Arquivo: glfw.go Projeto: maun/glfw
func SetCursorPos(window Window, x, y int) {
	C.glfwSetCursorPos(C.GLFWwindow(window), C.int(x), C.int(y))
}
Exemplo n.º 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()
}
Exemplo n.º 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))
}