LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: Cant seem to detect scrolling  (Read 245 times)

orange451

  • Newbie
  • *
  • Offline Offline
  • Posts: 27
Cant seem to detect scrolling
« 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?
Logged

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1891
Re: Cant seem to detect scrolling
« Reply #1 on: July 08, 2017, 22:17:41 »

Yes, do not override the methods callback, getSignature and close.
Logged

orange451

  • Newbie
  • *
  • Offline Offline
  • Posts: 27
Re: Cant seem to detect scrolling
« Reply #2 on: July 08, 2017, 23:07:03 »

Perfect! Thank you, Spasi!
Logged