Skip to content

Conversation

@tonihele
Copy link
Contributor

@tonihele tonihele commented Dec 6, 2017

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.

@tonihele tonihele changed the title Simple animated cursor support Simple animated cursor support for LWJGL 3 Dec 6, 2017
@tonihele tonihele changed the title Simple animated cursor support for LWJGL 3 Animated cursor support for LWJGL 3 Dec 6, 2017
@tonihele
Copy link
Contributor Author

tonihele commented Dec 6, 2017

Also in case this is all fine and dandy, is there a possibility for this late addition to be added to the 3.2?

@Nehon
Copy link
Contributor

Nehon commented Dec 6, 2017

@empirephoenix @JavaSaBr could you review this PR please?

private final LwjglWindow context;
private RawInputListener listener;
private boolean cursorVisible = true;
private Long[] currentCursor;
Copy link
Contributor

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[]?

Copy link
Contributor Author

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 :(

Copy link
Contributor

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.

Copy link
Contributor Author

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>();
Copy link
Contributor

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() ;)

Copy link
Contributor Author

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 :)

@JavaSaBr
Copy link
Contributor

JavaSaBr commented Dec 7, 2017

@Nehon I have tested these changes, it works fine.

@empirephoenix
Copy link
Contributor

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

@Nehon
Copy link
Contributor

Nehon commented Dec 7, 2017

@tonihele could you update the PR with the requested changes? I'll merge it right and it should make it in 3.2 alpha3

@tonihele
Copy link
Contributor Author

tonihele commented Dec 7, 2017

Thanks! I'll get back to this in about 10 hours or so.

@Nehon
Copy link
Contributor

Nehon commented Dec 7, 2017

how many minutes? :D

@tonihele
Copy link
Contributor Author

tonihele commented Dec 7, 2017

Right on schedule :)

@Nehon
Copy link
Contributor

Nehon commented Dec 7, 2017

I almost waited.... ;)
Right once the build is green I'll merge the PR.
Thanks ;)

@Nehon Nehon merged commit 09f4ae4 into jMonkeyEngine:master Dec 8, 2017
@tonihele tonihele deleted the feature-784 branch December 12, 2017 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants