Example #1
0
// GetMouseButton returns the last state reported for the specified mouse button.
//
// If the StickyMouseButtons input mode is enabled, this function returns Press
// the first time you call this function after a mouse button has been pressed,
// even if the mouse button has already been released.
func (w *Window) GetMouseButton(button MouseButton) Action {
	ret := Action(C.glfwGetMouseButton(w.data, C.int(button)))
	panicError()
	return ret
}
Example #2
0
File: glfw.go Project: maun/glfw
func MouseButton(window Window, button int) int {
	return int(C.glfwGetMouseButton(C.GLFWwindow(window), C.int(button)))
}
Example #3
0
File: glfw.go Project: andrebq/glfw
// MouseButton returns glfw.Pressed if the given mouse button is held down.
// glfw.Released otherwise.
func MouseButton(btn int) int { return int(C.glfwGetMouseButton(C.int(btn))) }
Example #4
0
//GetMouseButton returns the last state reported for the specified mouse button.
//
//If the StickyMouseButtons input mode is enabled, this function returns Press
//the first time you call this function after a mouse button has been pressed,
//even if the mouse button has already been released.
func (w *Window) GetMouseButton(button MouseButton) Action {
	return Action(C.glfwGetMouseButton(w.data, C.int(button)))
}