|
|
@ -108,6 +108,7 @@ public class ChaseCamera implements ActionListener, AnalogListener, Control { |
|
|
|
protected final static String ChaseCamMoveRight = "ChaseCamMoveRight"; |
|
|
|
protected final static String ChaseCamMoveRight = "ChaseCamMoveRight"; |
|
|
|
protected final static String ChaseCamToggleRotate = "ChaseCamToggleRotate"; |
|
|
|
protected final static String ChaseCamToggleRotate = "ChaseCamToggleRotate"; |
|
|
|
protected boolean zoomin; |
|
|
|
protected boolean zoomin; |
|
|
|
|
|
|
|
protected boolean hideCursorOnRotate = true; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Constructs the chase camera |
|
|
|
* Constructs the chase camera |
|
|
@ -158,13 +159,17 @@ public class ChaseCamera implements ActionListener, AnalogListener, Control { |
|
|
|
if (name.equals(ChaseCamToggleRotate) && enabled) { |
|
|
|
if (name.equals(ChaseCamToggleRotate) && enabled) { |
|
|
|
if (keyPressed) { |
|
|
|
if (keyPressed) { |
|
|
|
canRotate = true; |
|
|
|
canRotate = true; |
|
|
|
|
|
|
|
if (hideCursorOnRotate) { |
|
|
|
inputManager.setCursorVisible(false); |
|
|
|
inputManager.setCursorVisible(false); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
canRotate = false; |
|
|
|
canRotate = false; |
|
|
|
|
|
|
|
if (hideCursorOnRotate) { |
|
|
|
inputManager.setCursorVisible(true); |
|
|
|
inputManager.setCursorVisible(true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -874,6 +879,14 @@ public class ChaseCamera implements ActionListener, AnalogListener, Control { |
|
|
|
return initialUpVec; |
|
|
|
return initialUpVec; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isHideCursorOnRotate() { |
|
|
|
|
|
|
|
return hideCursorOnRotate; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setHideCursorOnRotate(boolean hideCursorOnRotate) { |
|
|
|
|
|
|
|
this.hideCursorOnRotate = hideCursorOnRotate; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* invert the vertical axis movement of the mouse |
|
|
|
* invert the vertical axis movement of the mouse |
|
|
|
* @param invertYaxis |
|
|
|
* @param invertYaxis |
|
|
|