Package com.jme3.niftygui
Class InputSystemJme
java.lang.Object
com.jme3.niftygui.InputSystemJme
- All Implemented Interfaces:
RawInputListener,de.lessvoid.nifty.spi.input.InputSystem
public class InputSystemJme
extends Object
implements de.lessvoid.nifty.spi.input.InputSystem, RawInputListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled before a batch of input will be sent to thisRawInputListener.voidendInput()Called after a batch of input was sent to thisRawInputListener.voidforwardEvents(de.lessvoid.nifty.NiftyInputConsumer nic) voidInvoked on joystick axis events.voidInvoked on joystick button presses.voidonKeyEvent(KeyInputEvent evt) Invoked on keyboard key press or release events.voidInvoked on mouse button events.voidInvoked on mouse movement/motion events.voidonTouchEvent(TouchEvent evt) Invoked on touchscreen touch events.voidreset()Reset internal state of the input system.voidsetHeight(int height) voidsetMousePosition(int x, int y) voidsetNifty(de.lessvoid.nifty.Nifty nifty) Must be set in order for nifty events to be forwarded correctly.voidsetResourceLoader(de.lessvoid.nifty.tools.resourceloader.NiftyResourceLoader niftyResourceLoader)
-
Constructor Details
-
InputSystemJme
-
-
Method Details
-
setResourceLoader
public void setResourceLoader(de.lessvoid.nifty.tools.resourceloader.NiftyResourceLoader niftyResourceLoader) - Specified by:
setResourceLoaderin interfacede.lessvoid.nifty.spi.input.InputSystem
-
setNifty
public void setNifty(de.lessvoid.nifty.Nifty nifty) Must be set in order for nifty events to be forwarded correctly.- Parameters:
nifty- the Nifty instance to use
-
reset
public void reset()Reset internal state of the input system. Must be called when the display is reinitialized or when the internal state becomes invalid. -
setHeight
public void setHeight(int height) - Parameters:
height- The height of the viewport. Used to convert bottom-left origin to upper-left origin.
-
setMousePosition
public void setMousePosition(int x, int y) - Specified by:
setMousePositionin interfacede.lessvoid.nifty.spi.input.InputSystem
-
beginInput
public void beginInput()Description copied from interface:RawInputListenerCalled before a batch of input will be sent to thisRawInputListener.- Specified by:
beginInputin interfaceRawInputListener
-
endInput
public void endInput()Description copied from interface:RawInputListenerCalled after a batch of input was sent to thisRawInputListener. The listener should set theconsumed flagon any events that have been consumed either at this call or previous calls.- Specified by:
endInputin interfaceRawInputListener
-
onMouseMotionEvent
Description copied from interface:RawInputListenerInvoked on mouse movement/motion events.- Specified by:
onMouseMotionEventin interfaceRawInputListener- Parameters:
evt- information about the event
-
onMouseButtonEvent
Description copied from interface:RawInputListenerInvoked on mouse button events.- Specified by:
onMouseButtonEventin interfaceRawInputListener- Parameters:
evt- information about the event
-
onJoyAxisEvent
Description copied from interface:RawInputListenerInvoked on joystick axis events.- Specified by:
onJoyAxisEventin interfaceRawInputListener- Parameters:
evt- information about the event
-
onJoyButtonEvent
Description copied from interface:RawInputListenerInvoked on joystick button presses.- Specified by:
onJoyButtonEventin interfaceRawInputListener- Parameters:
evt- information about the event
-
onKeyEvent
Description copied from interface:RawInputListenerInvoked on keyboard key press or release events.- Specified by:
onKeyEventin interfaceRawInputListener- Parameters:
evt- information about the event
-
onTouchEvent
Description copied from interface:RawInputListenerInvoked on touchscreen touch events.- Specified by:
onTouchEventin interfaceRawInputListener- Parameters:
evt- information about the event
-
forwardEvents
public void forwardEvents(de.lessvoid.nifty.NiftyInputConsumer nic) - Specified by:
forwardEventsin interfacede.lessvoid.nifty.spi.input.InputSystem
-