Class MouseKbdListener

    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.badlogic.gdx.input.GestureDetector

        com.badlogic.gdx.input.GestureDetector.GestureAdapter, com.badlogic.gdx.input.GestureDetector.GestureListener
    • Field Summary

      Modifier and Type Field Description
      protected NaturalCamera camera  
      protected com.badlogic.gdx.utils.IntSet pressedKeys
      Holds the pressed keys at any moment
    • Constructor Summary

      Modifier Constructor Description
      protected MouseKbdListener​(com.badlogic.gdx.input.GestureDetector.GestureListener gl, NaturalCamera camera)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPressedKey​(int keycode)  
      boolean allPressed​(int... keys)
      Returns true if all keys are pressed
      boolean anyPressed​(int... keys)
      Returns true if any of the keys are pressed
      float getResponseTime()  
      boolean isKeyPressed​(int keycode)  
      boolean keyDown​(int keycode)  
      boolean keyUp​(int keycode)  
      void removePressedKey​(int keycode)  
      • Methods inherited from class com.badlogic.gdx.input.GestureDetector

        cancel, invalidateTapSquare, isLongPressed, isLongPressed, isPanning, reset, setLongPressSeconds, setMaxFlingDelay, setTapCountInterval, setTapRectangleSize, setTapSquareSize, touchDown, touchDown, touchDragged, touchDragged, touchUp, touchUp
      • Methods inherited from class com.badlogic.gdx.InputAdapter

        keyTyped, mouseMoved, scrolled
      • Methods inherited from class java.lang.Object

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

      • pressedKeys

        protected com.badlogic.gdx.utils.IntSet pressedKeys
        Holds the pressed keys at any moment
    • Constructor Detail

      • MouseKbdListener

        protected MouseKbdListener​(com.badlogic.gdx.input.GestureDetector.GestureListener gl,
                                   NaturalCamera camera)
    • Method Detail

      • addPressedKey

        public void addPressedKey​(int keycode)
      • removePressedKey

        public void removePressedKey​(int keycode)
      • keyDown

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

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

        public boolean isKeyPressed​(int keycode)
      • allPressed

        public boolean allPressed​(int... keys)
        Returns true if all keys are pressed
        keys - The keys to test
        True if all are pressed
      • anyPressed

        public boolean anyPressed​(int... keys)
        Returns true if any of the keys are pressed
        keys - The keys to test
        True if any is pressed
      • getResponseTime

        public float getResponseTime()