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 Details

    • InputSystemJme

      public InputSystemJme(InputManager inputManager)
  • Method Details

    • setResourceLoader

      public void setResourceLoader(de.lessvoid.nifty.tools.resourceloader.NiftyResourceLoader niftyResourceLoader)
      Specified by:
      setResourceLoader in interface de.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:
      setMousePosition in interface de.lessvoid.nifty.spi.input.InputSystem
    • beginInput

      public void beginInput()
      Description copied from interface: RawInputListener
      Called before a batch of input will be sent to this RawInputListener.
      Specified by:
      beginInput in interface RawInputListener
    • endInput

      public void endInput()
      Description copied from interface: RawInputListener
      Called after a batch of input was sent to this RawInputListener. The listener should set the consumed flag on any events that have been consumed either at this call or previous calls.
      Specified by:
      endInput in interface RawInputListener
    • onMouseMotionEvent

      public void onMouseMotionEvent(MouseMotionEvent evt)
      Description copied from interface: RawInputListener
      Invoked on mouse movement/motion events.
      Specified by:
      onMouseMotionEvent in interface RawInputListener
      Parameters:
      evt - information about the event
    • onMouseButtonEvent

      public void onMouseButtonEvent(MouseButtonEvent evt)
      Description copied from interface: RawInputListener
      Invoked on mouse button events.
      Specified by:
      onMouseButtonEvent in interface RawInputListener
      Parameters:
      evt - information about the event
    • onJoyAxisEvent

      public void onJoyAxisEvent(JoyAxisEvent evt)
      Description copied from interface: RawInputListener
      Invoked on joystick axis events.
      Specified by:
      onJoyAxisEvent in interface RawInputListener
      Parameters:
      evt - information about the event
    • onJoyButtonEvent

      public void onJoyButtonEvent(JoyButtonEvent evt)
      Description copied from interface: RawInputListener
      Invoked on joystick button presses.
      Specified by:
      onJoyButtonEvent in interface RawInputListener
      Parameters:
      evt - information about the event
    • onKeyEvent

      public void onKeyEvent(KeyInputEvent evt)
      Description copied from interface: RawInputListener
      Invoked on keyboard key press or release events.
      Specified by:
      onKeyEvent in interface RawInputListener
      Parameters:
      evt - information about the event
    • onTouchEvent

      public void onTouchEvent(TouchEvent evt)
      Description copied from interface: RawInputListener
      Invoked on touchscreen touch events.
      Specified by:
      onTouchEvent in interface RawInputListener
      Parameters:
      evt - information about the event
    • forwardEvents

      public void forwardEvents(de.lessvoid.nifty.NiftyInputConsumer nic)
      Specified by:
      forwardEvents in interface de.lessvoid.nifty.spi.input.InputSystem