Java – Libgdx set the cursor to the hand pointer

Tags: , , ,



I have been doing some research on libgdx and can’t find anything relating to this, you can set the pointer image but that isn’t what I’m wanting, I tried the set cursor with j frame and stuff but it wouldn’t work, what I want is for the default hand cursor to be set when it is called

Answer

There is no way to do that in default LWJGL backend. You may have some luck by using Swing/AWT, embedding libGDX via LwjglCanvas and setting the cursor via Swing. But converting the hand cursor to bitmap and using standard Gdx.graphics.setCursor() will be much easier.



Source: stackoverflow