Пример #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
}
Пример #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
// 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
//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)))
}