LibGDX - Swipe Up, swipe right, swipe down, swipe left and buttons touch?

http://imageshack.us/a/img836/2909/swipe1.png

In the green area the user can swipe up, right, down, left. How can I now get this swipes?
e.g. how to get a String -> input = getSwiped(); -> input is then Up, or right, or down, or left

And the user can touch two buttons. 1 or 2.
1 is for duck and 2 is for jump.

I want to check this inputs at the same time (Multitouch). The user can touch one of the button and also swipe at the same moment.

I know there is a GestureDetector. I looked at the code, but no clue how can I use the swipe part.

I know a little bit how to check the buttons. The problem is only here -> How to check the inputs at the same time and how get Swipe Up, or Swipe right etc.

I searched an found how to check Multitouching:

    for (int i = 0; i < 10; i++) {
        if (Gdx.input.isTouched(i) == false) continue;

        float x = Gdx.input.getX(i);
        float y = Gdx.graphics.getHeight() - Gdx.input.getY(i) - 1;
        //...
    }

Thank You.

For swipe type just compare the delta between X pairs and Y pairs. If X delta > Y delta, then it’s horizontal (vice versa). Left or right, look on which one bigger, the touch down or the touch up.

For duck and jump you may just add click listener to each button. You better have the buttons extending Actor.

Thanks!

Check out also GestureDetector in the API, it can detect certain gestures automatically

in this case you would use touchDragged and then check the values
or fling() in GestureDetector.GestureListener