func onMouseButton(window *glfw.Window, b glfw.MouseButton, action glfw.Action, mods glfw.ModifierKey) { if action != glfw.Press { return } switch glfw.MouseButton(b) { case glfw.MouseButtonLeft: return case glfw.MouseButtonRight: return default: return } }
func onMouseBtn(window *glfw.Window, b glfw.MouseButton, action glfw.Action, mods glfw.ModifierKey) { if action != glfw.Press { return } // disable if event handlers are flagged off if birdCollided { return } switch glfw.MouseButton(b) { case glfw.MouseButtonLeft: jump() default: return } }