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

The following examples show how to use com.jme3.input.InputManager#hasMapping() . 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: 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 2
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 3
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 4
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 5
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 6
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);
}
 
Example 7
Source File: AdvancedAbstractEditor3DPart.java    From jmonkeybuilder with Apache License 2.0 4 votes vote down vote up
@JmeThread
private static void addMapping(@NotNull final InputManager inputManager, @NotNull final String name,
                               @NotNull final Trigger[] triggers) {
    if (!inputManager.hasMapping(name)) inputManager.addMapping(name, triggers);
}
 
Example 8
Source File: AdvancedAbstractEditor3DPart.java    From jmonkeybuilder with Apache License 2.0 4 votes vote down vote up
@JmeThread
private static void addMapping(@NotNull final InputManager inputManager, @NotNull final String name,
                               @NotNull final Trigger trigger) {
    if (!inputManager.hasMapping(name)) inputManager.addMapping(name, trigger);
}