예제 #1
0
파일: input.go 프로젝트: godispy/glfw
// 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
}
예제 #2
0
파일: glfw.go 프로젝트: maun/glfw
func MouseButton(window Window, button int) int {
	return int(C.glfwGetMouseButton(C.GLFWwindow(window), C.int(button)))
}
예제 #3
0
파일: glfw.go 프로젝트: 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))) }
예제 #4
0
파일: input.go 프로젝트: jasonrpowers/glfw3
//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)))
}