Package gaiasky.interafce
Class NaturalMouseKbdListener
java.lang.Object
com.badlogic.gdx.InputAdapter
com.badlogic.gdx.input.GestureDetector
gaiasky.interafce.MouseKbdListener
gaiasky.interafce.NaturalMouseKbdListener
- All Implemented Interfaces:
com.badlogic.gdx.InputProcessor,IObserver,IInputListener
Input listener for the natural camera.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classNested classes/interfaces inherited from class com.badlogic.gdx.input.GestureDetector
com.badlogic.gdx.input.GestureDetector.GestureAdapter, com.badlogic.gdx.input.GestureDetector.GestureListener -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanWhether scrolling requires the activeKey to be pressed (false) or always allow scrolling (true).protected intThe current (first) button being pressed.intThe button for rotating the camera either around its center or around the focus.intThe button for moving the camera along the direction axisintThe button for panning the camera along the up/right planeintThe key for rolling the camerafloatThe weight for each scrolled amount.Fields inherited from class gaiasky.interafce.MouseKbdListener
camera, pressedKeys -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNaturalMouseKbdListener(NaturalMouseKbdListener.GaiaGestureListener gestureListener, NaturalCamera camera)NaturalMouseKbdListener(NaturalCamera camera) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()voidvoidprotected booleanprocessDrag(int screenX, int screenY, double deltaX, double deltaY, int button)booleanscrolled(float amountX, float amountY)booleantouchDown(int screenX, int screenY, int pointer, int button)booleantouchDragged(int screenX, int screenY, int pointer)booleantouchUp(int screenX, int screenY, int pointer, int button)voidupdate()booleanzoom(float amount)Methods inherited from class gaiasky.interafce.MouseKbdListener
addPressedKey, allPressed, anyPressed, getResponseTime, isKeyPressed, keyDown, keyUp, removePressedKeyMethods inherited from class com.badlogic.gdx.input.GestureDetector
cancel, invalidateTapSquare, isLongPressed, isLongPressed, isPanning, reset, setLongPressSeconds, setMaxFlingDelay, setTapCountInterval, setTapRectangleSize, setTapSquareSize, touchDown, touchDragged, touchUpMethods inherited from class com.badlogic.gdx.InputAdapter
keyTyped, mouseMoved
-
Field Details
-
leftMouseButton
public int leftMouseButtonThe button for rotating the camera either around its center or around the focus. -
rightMouseButton
public int rightMouseButtonThe button for panning the camera along the up/right plane -
middleMouseButton
public int middleMouseButtonThe button for moving the camera along the direction axis -
alwaysScroll
public boolean alwaysScrollWhether scrolling requires the activeKey to be pressed (false) or always allow scrolling (true). -
scrollFactor
public float scrollFactorThe weight for each scrolled amount. -
rollKey
public int rollKeyThe key for rolling the camera -
button
protected int buttonThe current (first) button being pressed. -
gestureListener
-
-
Constructor Details
-
NaturalMouseKbdListener
protected NaturalMouseKbdListener(NaturalMouseKbdListener.GaiaGestureListener gestureListener, NaturalCamera camera) -
NaturalMouseKbdListener
-
-
Method Details
-
touchDown
public boolean touchDown(int screenX, int screenY, int pointer, int button)- Specified by:
touchDownin interfacecom.badlogic.gdx.InputProcessor- Overrides:
touchDownin classcom.badlogic.gdx.input.GestureDetector
-
touchUp
public boolean touchUp(int screenX, int screenY, int pointer, int button)- Specified by:
touchUpin interfacecom.badlogic.gdx.InputProcessor- Overrides:
touchUpin classcom.badlogic.gdx.input.GestureDetector
-
processDrag
protected boolean processDrag(int screenX, int screenY, double deltaX, double deltaY, int button) -
touchDragged
public boolean touchDragged(int screenX, int screenY, int pointer)- Specified by:
touchDraggedin interfacecom.badlogic.gdx.InputProcessor- Overrides:
touchDraggedin classcom.badlogic.gdx.input.GestureDetector
-
scrolled
public boolean scrolled(float amountX, float amountY)- Specified by:
scrolledin interfacecom.badlogic.gdx.InputProcessor- Overrides:
scrolledin classcom.badlogic.gdx.InputAdapter
-
zoom
public boolean zoom(float amount) -
update
public void update()- Specified by:
updatein interfaceIInputListener
-
activate
public void activate()- Specified by:
activatein interfaceIInputListener
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceIInputListener
-
notify
-