Class InputDispatcher

  • All Implemented Interfaces:
    com.badlogic.gdx.InputProcessor

    public final class InputDispatcher
    extends java.lang.Object
    implements com.badlogic.gdx.InputProcessor
    Input dispatcher that bridges LibGDX input processor with Gamelib Input.
    • Constructor Summary

      Constructors 
      Constructor Description
      InputDispatcher​(@NotNull Input gameInputProcessor)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void connect​(@NotNull Input sceneInputProcessor)  
      void disconnect​(@NotNull Input sceneInputProcessor)  
      boolean keyDown​(int keycode)  
      boolean keyTyped​(char character)  
      boolean keyUp​(int keycode)  
      boolean mouseMoved​(int screenX, int screenY)  
      boolean scrolled​(int amount)  
      boolean touchDown​(int screenX, int screenY, int pointer, int button)  
      boolean touchDragged​(int screenX, int screenY, int pointer)  
      boolean touchUp​(int screenX, int screenY, int pointer, int button)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InputDispatcher

        public InputDispatcher​(@NotNull
                               @NotNull Input gameInputProcessor)
    • Method Detail

      • connect

        public void connect​(@NotNull
                            @NotNull Input sceneInputProcessor)
      • disconnect

        public void disconnect​(@NotNull
                               @NotNull Input sceneInputProcessor)
      • keyDown

        public boolean keyDown​(int keycode)
        Specified by:
        keyDown in interface com.badlogic.gdx.InputProcessor
      • keyUp

        public boolean keyUp​(int keycode)
        Specified by:
        keyUp in interface com.badlogic.gdx.InputProcessor
      • keyTyped

        public boolean keyTyped​(char character)
        Specified by:
        keyTyped in interface com.badlogic.gdx.InputProcessor
      • touchDown

        public boolean touchDown​(int screenX,
                                 int screenY,
                                 int pointer,
                                 int button)
        Specified by:
        touchDown in interface com.badlogic.gdx.InputProcessor
      • touchUp

        public boolean touchUp​(int screenX,
                               int screenY,
                               int pointer,
                               int button)
        Specified by:
        touchUp in interface com.badlogic.gdx.InputProcessor
      • touchDragged

        public boolean touchDragged​(int screenX,
                                    int screenY,
                                    int pointer)
        Specified by:
        touchDragged in interface com.badlogic.gdx.InputProcessor
      • mouseMoved

        public boolean mouseMoved​(int screenX,
                                  int screenY)
        Specified by:
        mouseMoved in interface com.badlogic.gdx.InputProcessor
      • scrolled

        public boolean scrolled​(int amount)
        Specified by:
        scrolled in interface com.badlogic.gdx.InputProcessor