Class MockInput

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

    public class MockInput
    extends java.lang.Object
    implements com.badlogic.gdx.Input
    The headless backend does its best to mock elements. This is intended to make code-sharing between server and client as simple as possible.
    • Constructor Detail

      • MockInput

        public MockInput()
    • Method Detail

      • getAccelerometerX

        public float getAccelerometerX()
        Specified by:
        getAccelerometerX in interface com.badlogic.gdx.Input
      • getAccelerometerY

        public float getAccelerometerY()
        Specified by:
        getAccelerometerY in interface com.badlogic.gdx.Input
      • getAccelerometerZ

        public float getAccelerometerZ()
        Specified by:
        getAccelerometerZ in interface com.badlogic.gdx.Input
      • getGyroscopeX

        public float getGyroscopeX()
        Specified by:
        getGyroscopeX in interface com.badlogic.gdx.Input
      • getGyroscopeY

        public float getGyroscopeY()
        Specified by:
        getGyroscopeY in interface com.badlogic.gdx.Input
      • getGyroscopeZ

        public float getGyroscopeZ()
        Specified by:
        getGyroscopeZ in interface com.badlogic.gdx.Input
      • getMaxPointers

        public int getMaxPointers()
        Specified by:
        getMaxPointers in interface com.badlogic.gdx.Input
      • getX

        public int getX()
        Specified by:
        getX in interface com.badlogic.gdx.Input
      • getX

        public int getX​(int pointer)
        Specified by:
        getX in interface com.badlogic.gdx.Input
      • getDeltaX

        public int getDeltaX()
        Specified by:
        getDeltaX in interface com.badlogic.gdx.Input
      • getDeltaX

        public int getDeltaX​(int pointer)
        Specified by:
        getDeltaX in interface com.badlogic.gdx.Input
      • getY

        public int getY()
        Specified by:
        getY in interface com.badlogic.gdx.Input
      • getY

        public int getY​(int pointer)
        Specified by:
        getY in interface com.badlogic.gdx.Input
      • getDeltaY

        public int getDeltaY()
        Specified by:
        getDeltaY in interface com.badlogic.gdx.Input
      • getDeltaY

        public int getDeltaY​(int pointer)
        Specified by:
        getDeltaY in interface com.badlogic.gdx.Input
      • isTouched

        public boolean isTouched()
        Specified by:
        isTouched in interface com.badlogic.gdx.Input
      • justTouched

        public boolean justTouched()
        Specified by:
        justTouched in interface com.badlogic.gdx.Input
      • isTouched

        public boolean isTouched​(int pointer)
        Specified by:
        isTouched in interface com.badlogic.gdx.Input
      • getPressure

        public float getPressure()
        Specified by:
        getPressure in interface com.badlogic.gdx.Input
      • getPressure

        public float getPressure​(int pointer)
        Specified by:
        getPressure in interface com.badlogic.gdx.Input
      • isButtonPressed

        public boolean isButtonPressed​(int button)
        Specified by:
        isButtonPressed in interface com.badlogic.gdx.Input
      • isButtonJustPressed

        public boolean isButtonJustPressed​(int button)
        Specified by:
        isButtonJustPressed in interface com.badlogic.gdx.Input
      • isKeyPressed

        public boolean isKeyPressed​(int key)
        Specified by:
        isKeyPressed in interface com.badlogic.gdx.Input
      • isKeyJustPressed

        public boolean isKeyJustPressed​(int key)
        Specified by:
        isKeyJustPressed in interface com.badlogic.gdx.Input
      • getTextInput

        public void getTextInput​(com.badlogic.gdx.Input.TextInputListener listener,
                                 java.lang.String title,
                                 java.lang.String text,
                                 java.lang.String hint)
        Specified by:
        getTextInput in interface com.badlogic.gdx.Input
      • getTextInput

        public void getTextInput​(com.badlogic.gdx.Input.TextInputListener listener,
                                 java.lang.String title,
                                 java.lang.String text,
                                 java.lang.String hint,
                                 com.badlogic.gdx.Input.OnscreenKeyboardType type)
        Specified by:
        getTextInput in interface com.badlogic.gdx.Input
      • setOnscreenKeyboardVisible

        public void setOnscreenKeyboardVisible​(boolean visible)
        Specified by:
        setOnscreenKeyboardVisible in interface com.badlogic.gdx.Input
      • setOnscreenKeyboardVisible

        public void setOnscreenKeyboardVisible​(boolean visible,
                                               com.badlogic.gdx.Input.OnscreenKeyboardType type)
        Specified by:
        setOnscreenKeyboardVisible in interface com.badlogic.gdx.Input
      • vibrate

        public void vibrate​(int milliseconds)
        Specified by:
        vibrate in interface com.badlogic.gdx.Input
      • vibrate

        public void vibrate​(int milliseconds,
                            boolean fallback)
        Specified by:
        vibrate in interface com.badlogic.gdx.Input
      • vibrate

        public void vibrate​(int milliseconds,
                            int amplitude,
                            boolean fallback)
        Specified by:
        vibrate in interface com.badlogic.gdx.Input
      • vibrate

        public void vibrate​(com.badlogic.gdx.Input.VibrationType vibrationType)
        Specified by:
        vibrate in interface com.badlogic.gdx.Input
      • getAzimuth

        public float getAzimuth()
        Specified by:
        getAzimuth in interface com.badlogic.gdx.Input
      • getPitch

        public float getPitch()
        Specified by:
        getPitch in interface com.badlogic.gdx.Input
      • getRoll

        public float getRoll()
        Specified by:
        getRoll in interface com.badlogic.gdx.Input
      • getRotationMatrix

        public void getRotationMatrix​(float[] matrix)
        Specified by:
        getRotationMatrix in interface com.badlogic.gdx.Input
      • getCurrentEventTime

        public long getCurrentEventTime()
        Specified by:
        getCurrentEventTime in interface com.badlogic.gdx.Input
      • setCatchBackKey

        public void setCatchBackKey​(boolean catchBack)
        Specified by:
        setCatchBackKey in interface com.badlogic.gdx.Input
      • isCatchBackKey

        public boolean isCatchBackKey()
        Specified by:
        isCatchBackKey in interface com.badlogic.gdx.Input
      • setCatchMenuKey

        public void setCatchMenuKey​(boolean catchMenu)
        Specified by:
        setCatchMenuKey in interface com.badlogic.gdx.Input
      • isCatchMenuKey

        public boolean isCatchMenuKey()
        Specified by:
        isCatchMenuKey in interface com.badlogic.gdx.Input
      • setCatchKey

        public void setCatchKey​(int keycode,
                                boolean catchKey)
        Specified by:
        setCatchKey in interface com.badlogic.gdx.Input
      • isCatchKey

        public boolean isCatchKey​(int keycode)
        Specified by:
        isCatchKey in interface com.badlogic.gdx.Input
      • setInputProcessor

        public void setInputProcessor​(com.badlogic.gdx.InputProcessor processor)
        Specified by:
        setInputProcessor in interface com.badlogic.gdx.Input
      • getInputProcessor

        public com.badlogic.gdx.InputProcessor getInputProcessor()
        Specified by:
        getInputProcessor in interface com.badlogic.gdx.Input
      • isPeripheralAvailable

        public boolean isPeripheralAvailable​(com.badlogic.gdx.Input.Peripheral peripheral)
        Specified by:
        isPeripheralAvailable in interface com.badlogic.gdx.Input
      • getRotation

        public int getRotation()
        Specified by:
        getRotation in interface com.badlogic.gdx.Input
      • getNativeOrientation

        public com.badlogic.gdx.Input.Orientation getNativeOrientation()
        Specified by:
        getNativeOrientation in interface com.badlogic.gdx.Input
      • setCursorCatched

        public void setCursorCatched​(boolean catched)
        Specified by:
        setCursorCatched in interface com.badlogic.gdx.Input
      • isCursorCatched

        public boolean isCursorCatched()
        Specified by:
        isCursorCatched in interface com.badlogic.gdx.Input
      • setCursorPosition

        public void setCursorPosition​(int x,
                                      int y)
        Specified by:
        setCursorPosition in interface com.badlogic.gdx.Input