How to use the mouse wheel in LibGDX?

java, libgdx, opengl

Solution

You'll want to create a class that implements the InputProcessor interface (javadoc link here). It contains a method called "scrolled", which I believe is what you are looking for.

Problem

I'm trying to allow the player to zoom the camera in and out using the mouse wheel, but I can't find any methods that interact with the mouse wheel. Is it possible to use the mouse wheel with LibGDX?

Original source