Java Code Examples for com.jme3.input.InputManager#removeListener()

The following examples show how to use com.jme3.input.InputManager#removeListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AdvancedAbstractEditor3DPart.java    From jmonkeybuilder with Apache License 2.0 6 votes vote down vote up
@Override
@JmeThread
public void cleanup() {
    super.cleanup();

    final RenderFilterExtension filterExtension = RenderFilterExtension.getInstance();
    filterExtension.disableFilters();

    final Node rootNode = EditorUtil.getGlobalRootNode();
    rootNode.detachChild(getStateNode());

    final EditorCamera editorCamera = getEditorCamera();
    final InputManager inputManager = EditorUtil.getInputManager();
    inputManager.removeListener(actionListener);
    inputManager.removeListener(analogListener);

    if (editorCamera != null) {
        editorCamera.setEnabled(false);
        editorCamera.unregisterInput(inputManager);
    }
}
 
Example 2
Source File: BasicProfilerState.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@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);
}
 
Example 3
Source File: IsometricCameraManager.java    From OpenRTS with MIT License 5 votes vote down vote up
@Override
public void unregisterInputs(InputManager inputManager){
	for(String s : mappings) {
		if(inputManager.hasMapping(s)) {
			inputManager.deleteMapping(s);
		}
	}
	inputManager.removeListener(this);
}
 
Example 4
Source File: GroundCameraManager.java    From OpenRTS with MIT License 5 votes vote down vote up
@Override
public void unregisterInputs(InputManager inputManager){
	for(String s : mappings) {
		if(inputManager.hasMapping(s)) {
			inputManager.deleteMapping(s);
		}
	}
	inputManager.removeListener(this);
}
 
Example 5
Source File: BattlefieldInputInterpreter.java    From OpenRTS with MIT License 5 votes vote down vote up
@Override
protected void unregisterInputs(InputManager inputManager) {
	for (String s : mappings) {
		if (inputManager.hasMapping(s)) {
			inputManager.deleteMapping(s);
		}
	}
	inputManager.removeListener(this);
}
 
Example 6
Source File: EditorInputInterpreter.java    From OpenRTS with MIT License 5 votes vote down vote up
@Override
protected void unregisterInputs(InputManager inputManager) {
	for (String s : mappings) {
		if (inputManager.hasMapping(s)) {
			inputManager.deleteMapping(s);
		}
	}
	inputManager.removeListener(this);
}
 
Example 7
Source File: GroundInputInterpreter.java    From OpenRTS with MIT License 5 votes vote down vote up
@Override
protected void unregisterInputs(InputManager inputManager) {
	for (String s : mappings) {
		if (inputManager.hasMapping(s)) {
			inputManager.deleteMapping(s);
		}
	}
	inputManager.removeListener(this);
}