LWJGL Forum

Programming => OpenGL => Topic started by: orange451 on July 08, 2017, 22:03:29

Title: Cant seem to detect scrolling
Post by: orange451 on July 08, 2017, 22:03:29
Hiah!

Just tried out this little snippet earlier:
Code: [Select]
        GLFW.glfwSetScrollCallback( handle, new GLFWScrollCallback() {

@Override
public void invoke(long window, double arg1, double arg2) {
System.out.println("window " + window + " / " + arg1 + " / " + arg2);
}

@Override
public void callback(long arg0) {
//
}

@Override
public String getSignature() {
return "Scroll Callback";
}

@Override
public void close() {
//
}
       
        });

Nothing seems to print when I scroll the mouse. Am I doing something incorrectly?
Title: Re: Cant seem to detect scrolling
Post by: spasi on July 08, 2017, 22:17:41
Yes, do not override the methods callback, getSignature and close.
Title: Re: Cant seem to detect scrolling
Post by: orange451 on July 08, 2017, 23:07:03
Perfect! Thank you, Spasi!