Package com.simsilica.lemur.event
Class KeyInterceptState
java.lang.Object
com.jme3.app.state.BaseAppState
com.simsilica.lemur.event.KeyInterceptState
- All Implemented Interfaces:
AppState
AppState that registers a RawInputListener with the
InputManager so that key events can optionally be received
and consumed before normal listeners get them.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidcleanup(Application app) Called after the app state is detached or during application shutdown if the state is still attached.protected voiddispatch(KeyInputEvent evt) protected voidinitialize(Application app) Called during initialization once the app state is attached and before onEnable() is called.protected voidCalled when the state was previously enabled but is now disabled either because setEnabled(false) was called or the state is being cleaned up.protected voidonEnable()Called when the state is fully enabled, ie: is attached and isEnabled() is true or when the setEnabled() status changes after the state is attached.voidprotected voidsetModifier(int mask, boolean on) Methods inherited from class com.jme3.app.state.BaseAppState
cleanup, getApplication, getId, getState, getState, getState, getState, getStateManager, initialize, isEnabled, isInitialized, postRender, render, setEnabled, setId, stateAttached, stateDetached, update
-
Constructor Details
-
KeyInterceptState
-
-
Method Details
-
addKeyListener
-
removeKeyListener
-
initialize
Description copied from class:BaseAppStateCalled during initialization once the app state is attached and before onEnable() is called.- Specified by:
initializein classBaseAppState- Parameters:
app- the application
-
cleanup
Description copied from class:BaseAppStateCalled after the app state is detached or during application shutdown if the state is still attached. onDisable() is called before this cleanup() method if the state is enabled at the time of cleanup.- Specified by:
cleanupin classBaseAppState- Parameters:
app- the application
-
onEnable
protected void onEnable()Description copied from class:BaseAppStateCalled when the state is fully enabled, ie: is attached and isEnabled() is true or when the setEnabled() status changes after the state is attached.- Specified by:
onEnablein classBaseAppState
-
onDisable
protected void onDisable()Description copied from class:BaseAppStateCalled when the state was previously enabled but is now disabled either because setEnabled(false) was called or the state is being cleaned up.- Specified by:
onDisablein classBaseAppState
-
setModifier
protected void setModifier(int mask, boolean on) -
dispatch
-