@Override public void cleanup() { super.cleanup(); if (inputManager.hasMapping(INPUT_MAPPING_CAMERA_POS)) inputManager.deleteMapping(INPUT_MAPPING_CAMERA_POS); if (inputManager.hasMapping(INPUT_MAPPING_MEMORY)) inputManager.deleteMapping(INPUT_MAPPING_MEMORY); inputManager.removeListener(keyListener); }
@Override protected void cleanup( Application app ) { InputManager inputManager = app.getInputManager(); if( inputManager.hasMapping(INPUT_MAPPING_PROFILER_TOGGLE) ) { inputManager.deleteMapping(INPUT_MAPPING_PROFILER_TOGGLE); } inputManager.removeListener(keyListener); }
/** * Unregister this controller from its input manager. */ public void unregisterInput(){ if (inputManager == null) { return; } for (String s : mappings) { if (inputManager.hasMapping(s)) { inputManager.deleteMapping( s ); } } inputManager.removeListener(this); inputManager.setCursorVisible(!dragToRotate); Joystick[] joysticks = inputManager.getJoysticks(); if (joysticks != null && joysticks.length > 0){ // No way to unassign axis } }
@Override public void initialize() { app.initialize(); if (handleExitHook) { // remove existing mapping from SimpleApplication that stops the app // when the esc key is pressed (esc key = android back key) so that // AndroidHarness can produce the exit app dialog box. if (app.getInputManager().hasMapping(SimpleApplication.INPUT_MAPPING_EXIT)) { app.getInputManager().deleteMapping(SimpleApplication.INPUT_MAPPING_EXIT); } app.getInputManager().addMapping(ESCAPE_EVENT, new TouchTrigger(TouchInput.KEYCODE_BACK)); app.getInputManager().addListener(this, new String[]{ESCAPE_EVENT}); } }
public void initialize() { app.initialize(); if (handleExitHook) { // remove existing mapping from SimpleApplication that stops the app // when the esc key is pressed (esc key = android back key) so that // AndroidHarness can produce the exit app dialog box. if (app.getInputManager().hasMapping(SimpleApplication.INPUT_MAPPING_EXIT)) { app.getInputManager().deleteMapping(SimpleApplication.INPUT_MAPPING_EXIT); } app.getInputManager().addMapping(ESCAPE_EVENT, new TouchTrigger(TouchInput.KEYCODE_BACK)); app.getInputManager().addListener(this, new String[]{ESCAPE_EVENT}); } }
@Override public void cleanup() { super.cleanup(); if (inputManager.hasMapping(INPUT_MAPPING_CAMERA_POS)) inputManager.deleteMapping(INPUT_MAPPING_CAMERA_POS); if (inputManager.hasMapping(INPUT_MAPPING_MEMORY)) inputManager.deleteMapping(INPUT_MAPPING_MEMORY); inputManager.removeListener(keyListener); }
@Override protected void cleanup( Application app ) { InputManager inputManager = app.getInputManager(); if( inputManager.hasMapping(INPUT_MAPPING_PROFILER_TOGGLE) ) { inputManager.deleteMapping(INPUT_MAPPING_PROFILER_TOGGLE); } inputManager.removeListener(keyListener); }
/** * Registers the FlyByCamera to receive input events from the provided * Dispatcher. * @param inputManager */ public void unregisterInput(){ if (inputManager == null) { return; } for (String s : mappings) { if (inputManager.hasMapping(s)) { inputManager.deleteMapping( s ); } } inputManager.removeListener(this); inputManager.setCursorVisible(!dragToRotate); // Joystick[] joysticks = inputManager.getJoysticks(); // if (joysticks != null && joysticks.length > 0){ // Joystick joystick = joysticks[0]; // // // No way to unassing axis // } }
/** * Registers the FlyByCamera to receive input events from the provided * Dispatcher. * @param inputManager */ public void unregisterInput(){ if (inputManager == null) { return; } for (String s : mappings) { if (inputManager.hasMapping(s)) { inputManager.deleteMapping( s ); } } inputManager.removeListener(this); inputManager.setCursorVisible(!dragToRotate); // Joystick[] joysticks = inputManager.getJoysticks(); // if (joysticks != null && joysticks.length > 0){ // Joystick joystick = joysticks[0]; // // // No way to unassing axis // } }
/** * Unregister this controller from its input manager. */ public void unregisterInput(){ if (inputManager == null) { return; } for (String s : mappings) { if (inputManager.hasMapping(s)) { inputManager.deleteMapping( s ); } } inputManager.removeListener(this); inputManager.setCursorVisible(!dragToRotate); Joystick[] joysticks = inputManager.getJoysticks(); if (joysticks != null && joysticks.length > 0){ // No way to unassign axis } }