@NiftyEventSubscriber(id = "startGameButton") public void onTestButton1Click(final String id, final ButtonClickedEvent clickedEvent) { Boolean isKeyBindingValid = KeyBindingController.isKeyBindingValid(); if (isKeyBindingValid) { nifty.exit(); } else { } }
@Override public void cleanup() { localRootNode.removeLight(ai); localRootNode.removeLight(dl); this.app.getTimer().reset(); rootNode.detachChild(localRootNode); viewPort.removeProcessor(niftyDisplay); audio.stop(); nifty.exit(); cam.setRotation(Quaternion.IDENTITY); cam.setLocation(Vector3f.ZERO); cam.setViewPort(0, 1, 0, 1); super.cleanup(); }
@Override public void cleanup() { initialized = false; if (app != null) { app.getRootNode().detachAllChildren(); app.getRootNode().removeLight(sun); app.getGuiViewPort().clearScenes(); /* Otherwise after every reset the mapping triggers extra for every reset */ app.getInputManager().deleteMapping("LMB"); app.getInputManager().deleteMapping("KEY_R"); app.getInputManager().deleteMapping("KEY_F10"); } if (nifty != null) { nifty.exit(); } }
public void quit() { nifty.exit(); }