Ejemplo n.º 1
0
func (m MouseState) GetAxes() []int {
	var n int

	n = int(C.al_get_mouse_num_axes())

	ms := (C.ALLEGRO_MOUSE_STATE)(m)
	slice := make([]int, n)
	for i := 0; i < n; i++ {

		axis := int(C.al_get_mouse_state_axis(&ms, C.int(i)))
		slice[i] = axis

	}
	return slice
}
Ejemplo n.º 2
0
func (m *MouseState) GetAxis(axis int32) int32 {
	return int32(C.al_get_mouse_state_axis((*C.ALLEGRO_MOUSE_STATE)(unsafe.Pointer(m)), C.int(axis)))
}