aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-jogl
diff options
context:
space:
mode:
authorJoshua Slack <[email protected]>2018-01-15 12:06:45 -0600
committerJoshua Slack <[email protected]>2018-01-15 12:06:45 -0600
commit2817b5e3a39ca1c9fe42bdfe344db3400ff83264 (patch)
tree161cea1e12adab75294472d9c9ed645afe13a849 /ardor3d-jogl
parentec71ecdbbb1437dd57a0f47a1f70d36a25529038 (diff)
Update to mouse manager allowing null to be passed to setCursor to signify clearing the cursor
Diffstat (limited to 'ardor3d-jogl')
-rw-r--r--ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseManager.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseManager.java b/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseManager.java
index 10ca249..ae5692f 100644
--- a/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseManager.java
+++ b/ardor3d-jogl/src/main/java/com/ardor3d/input/jogl/JoglNewtMouseManager.java
@@ -3,7 +3,7 @@
*
* This file is part of Ardor3D.
*
- * Ardor3D is free software: you can redistribute it and/or modify it
+ * Ardor3D is free software: you can redistribute it and/or modify it
* under the terms of its license which may be found in the accompanying
* LICENSE file or at <http://www.ardor3d.com/LICENSE>.
*/
@@ -45,6 +45,10 @@ public class JoglNewtMouseManager implements MouseManager {
}
private PointerIcon createJoglCursor(final MouseCursor cursor) {
+ if (cursor == MouseCursor.SYSTEM_DEFAULT || cursor == null) {
+ return null; // setting the cursor to null in JOGL means using the system default one
+ }
+
final Image image = cursor.getImage();
final DimensionImmutable size = new Dimension(image.getWidth(), image.getHeight());
final ByteBuffer pixels = image.getData(0);