Heya guys, i was wondering if thats possible and if it have any drawbacks like “lag/slowdown”…
I read this btw
https://code.google.com/p/libgdx/issues/detail?id=642
Heya guys, i was wondering if thats possible and if it have any drawbacks like “lag/slowdown”…
I read this btw
https://code.google.com/p/libgdx/issues/detail?id=642
The suggestion regarding drawing it as a sprite via the SpriteBatch makes most sense to me. There shouldn’t be any frame drops due to it. When they talk about lag they must be referring to how sync the cursor position is to the drawn cursor’s position - it may lag behind - but it should only do so very minimally.
If it does, either use the point you are rendering your cursor at as your games cursor position (and use that cursor position for all your UI logic) or ignore it because it probably isn’t bad. Most games typically keep their own cursor position and simply measure the delta of mouse movement and add to that.
However, the cursor synchronization issue seems to be a moot argument because you will encounter the same sort of issue with your game outside of cursor animation - like interacting with Game UI components that use the cursor position - like windows (dragging them).
I use a similar method via Java2D to render my cursor - works fine for me.
hm. Ok!
i will try that as well! and will post the results
Btw, im working on my final college project for graduation, should i do like the guys here do? post it in " work in progress"? what should i do?
to me its unacceptable with the lag. hardware cursor vs software cursor is just so noticable…
and lwjgl actually supports custom cursor.
so I guess call the lwjgl stuff directly if its pc only.
Post it in WIP if you’re working on it.
Im sorry to revive this topic.
In the time i couldnt figure how to do this.
Now i did it, and heres the code for anyone who needs ,ok?
Pixmap pm = new Pixmap(Gdx.files.internal("imagens/Resources/ui/mouse/pasmateRs_crosshairs64/crosshair.png"));
int xHotSpot = pm.getWidth() / 2;
int yHotSpot = pm.getHeight() / 2;
Gdx.input.setCursorImage(pm, xHotSpot, yHotSpot);
pm.dispose();