ChaseCamera : added a hideCursorOnRotate flag to the chaseCam to prevent interfering with nifty.
See forum post http://jmonkeyengine.org/groups/gui/forum/topic/nifty-window-not-accepting-input-after-clicking-into-the-scene/?topic_page=3&num=15#post-189063 git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9697 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
5c9afd9d59
commit
e253546982
@ -108,6 +108,7 @@ public class ChaseCamera implements ActionListener, AnalogListener, Control {
|
||||
protected final static String ChaseCamMoveRight = "ChaseCamMoveRight";
|
||||
protected final static String ChaseCamToggleRotate = "ChaseCamToggleRotate";
|
||||
protected boolean zoomin;
|
||||
protected boolean hideCursorOnRotate = true;
|
||||
|
||||
/**
|
||||
* Constructs the chase camera
|
||||
@ -158,13 +159,17 @@ public class ChaseCamera implements ActionListener, AnalogListener, Control {
|
||||
if (name.equals(ChaseCamToggleRotate) && enabled) {
|
||||
if (keyPressed) {
|
||||
canRotate = true;
|
||||
if (hideCursorOnRotate) {
|
||||
inputManager.setCursorVisible(false);
|
||||
}
|
||||
} else {
|
||||
canRotate = false;
|
||||
if (hideCursorOnRotate) {
|
||||
inputManager.setCursorVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -874,6 +879,14 @@ public class ChaseCamera implements ActionListener, AnalogListener, Control {
|
||||
return initialUpVec;
|
||||
}
|
||||
|
||||
public boolean isHideCursorOnRotate() {
|
||||
return hideCursorOnRotate;
|
||||
}
|
||||
|
||||
public void setHideCursorOnRotate(boolean hideCursorOnRotate) {
|
||||
this.hideCursorOnRotate = hideCursorOnRotate;
|
||||
}
|
||||
|
||||
/**
|
||||
* invert the vertical axis movement of the mouse
|
||||
* @param invertYaxis
|
||||
|
Loading…
x
Reference in New Issue
Block a user