-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Animated cursor support for LWJGL 3 #785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Also in case this is all fine and dandy, is there a possibility for this late addition to be added to the 3.2? |
|
@empirephoenix @JavaSaBr could you review this PR please? |
| private final LwjglWindow context; | ||
| private RawInputListener listener; | ||
| private boolean cursorVisible = true; | ||
| private Long[] currentCursor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you use Long[] instead of long[]?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I use it in the Map as well :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use long[] in all places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, yesh, it is an object. Should go in there. Instinctively added value type because Map...
| private Queue<MouseMotionEvent> mouseMotionEvents = new LinkedList<MouseMotionEvent>(); | ||
| private Queue<MouseButtonEvent> mouseButtonEvents = new LinkedList<MouseButtonEvent>(); | ||
| private final Queue<MouseMotionEvent> mouseMotionEvents = new ArrayDeque<MouseMotionEvent>(); | ||
| private final Queue<MouseButtonEvent> mouseButtonEvents = new ArrayDeque<MouseButtonEvent>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok, but I think we can use the construction ArrayDeque<>() instead of ArrayDeque() ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! Diamonds for the win :)
|
@Nehon I have tested these changes, it works fine. |
|
Looks fine to me (apart from the already discussed stuff), looks like the cursor api really improved, since I saw it last time in lwjgl2 |
|
@tonihele could you update the PR with the requested changes? I'll merge it right and it should make it in 3.2 alpha3 |
|
Thanks! I'll get back to this in about 10 hours or so. |
|
how many minutes? :D |
|
Right on schedule :) |
|
I almost waited.... ;) |
Resolves #784
I also changed the LinkedLists to ArrayDeques as they should be "faster", anyway somewhat more recommended. Minor formattings :( But only minor.
This is also not discussed in the forums.