Allow "escape to exit" functionality to be disabled.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3557 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -29,7 +29,8 @@ public class GodViewHandler extends InputHandler
|
|||||||
/**
|
/**
|
||||||
* Creates the handler.
|
* Creates the handler.
|
||||||
*
|
*
|
||||||
* @param app The application to be terminated on an "exit" action.
|
* @param app The application to be terminated on an "exit" action or
|
||||||
|
* null if this functionality is not desired.
|
||||||
* @param cam The camera to move with this handler.
|
* @param cam The camera to move with this handler.
|
||||||
* @param api The API from which to create a KeyBindingManager.
|
* @param api The API from which to create a KeyBindingManager.
|
||||||
*/
|
*/
|
||||||
@@ -109,13 +110,15 @@ public class GodViewHandler extends InputHandler
|
|||||||
|
|
||||||
protected void setActions (Camera cam, final JmeApp app)
|
protected void setActions (Camera cam, final JmeApp app)
|
||||||
{
|
{
|
||||||
KeyInputAction exit = new KeyInputAction() {
|
if (app != null) {
|
||||||
public void performAction (InputActionEvent evt) {
|
KeyInputAction exit = new KeyInputAction() {
|
||||||
app.stop();
|
public void performAction (InputActionEvent evt) {
|
||||||
}
|
app.stop();
|
||||||
};
|
}
|
||||||
exit.setKey("exit");
|
};
|
||||||
addAction(exit);
|
exit.setKey("exit");
|
||||||
|
addAction(exit);
|
||||||
|
}
|
||||||
|
|
||||||
KeyScreenShotAction screen = new KeyScreenShotAction();
|
KeyScreenShotAction screen = new KeyScreenShotAction();
|
||||||
screen.setKey("screenshot");
|
screen.setKey("screenshot");
|
||||||
|
|||||||
Reference in New Issue
Block a user