package allegro5 // #include import "C" type MouseButton uint const ( MouseButtonLeft MouseButton = 1 MouseButtonRight = 2 MouseButtonMiddle = 3 ) func IsMouseButtonDown(b MouseButton) bool { var state C.ALLEGRO_MOUSE_STATE C.al_get_mouse_state(&state) return bool(C.al_mouse_button_down(&state, C.int(b))) } func IsAnyMouseButtonDown(buttons ...MouseButton) bool { var state C.ALLEGRO_MOUSE_STATE C.al_get_mouse_state(&state) for _, b := range buttons { if bool(C.al_mouse_button_down(&state, C.int(b))) { return true } } return false }