Package net.dermetfan.gdx.physics.box2d
Class MouseJointAdapter.Manager
java.lang.Object
com.badlogic.gdx.InputAdapter
net.dermetfan.gdx.physics.box2d.MouseJointAdapter.Manager
- All Implemented Interfaces:
com.badlogic.gdx.InputProcessor
- Enclosing class:
- MouseJointAdapter
public class MouseJointAdapter.Manager
extends com.badlogic.gdx.InputAdapter
Manages
MouseJointAdapters by creating new ones if necessary. Override newMouseJointAdapter(byte) to define how now ones will be created (by default a copy of the enclosing instance).-
Constructor Summary
Constructors Constructor Description Manager() -
Method Summary
Modifier and Type Method Description com.badlogic.gdx.utils.Array<MouseJointAdapter>getAdapters()bytegetMax()booleanmouseMoved(int screenX, int screenY)callsmouseMovedon alladaptersMouseJointAdapternewMouseJointAdapter(byte pointer)override this to define how newMouseJointAdaptersshould be createdvoidsetAdapters(com.badlogic.gdx.utils.Array<MouseJointAdapter> adapters)voidsetMax(byte max)booleantouchDown(int screenX, int screenY, int pointer, int button)callstouchDownon alladaptersand creates a new one if necessarybooleantouchDragged(int screenX, int screenY, int pointer)callstouchDraggedon alladaptersbooleantouchUp(int screenX, int screenY, int pointer, int button)callstouchUpon alladaptersMethods inherited from class com.badlogic.gdx.InputAdapter
keyDown, keyTyped, keyUp, scrolledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Manager
public Manager()
-
-
Method Details
-
touchDown
public boolean touchDown(int screenX, int screenY, int pointer, int button)callstouchDownon alladaptersand creates a new one if necessary- Specified by:
touchDownin interfacecom.badlogic.gdx.InputProcessor- Overrides:
touchDownin classcom.badlogic.gdx.InputAdapter
-
touchDragged
public boolean touchDragged(int screenX, int screenY, int pointer)callstouchDraggedon alladapters- Specified by:
touchDraggedin interfacecom.badlogic.gdx.InputProcessor- Overrides:
touchDraggedin classcom.badlogic.gdx.InputAdapter
-
mouseMoved
public boolean mouseMoved(int screenX, int screenY)callsmouseMovedon alladapters- Specified by:
mouseMovedin interfacecom.badlogic.gdx.InputProcessor- Overrides:
mouseMovedin classcom.badlogic.gdx.InputAdapter
-
touchUp
public boolean touchUp(int screenX, int screenY, int pointer, int button)callstouchUpon alladapters- Specified by:
touchUpin interfacecom.badlogic.gdx.InputProcessor- Overrides:
touchUpin classcom.badlogic.gdx.InputAdapter
-
newMouseJointAdapter
override this to define how newMouseJointAdaptersshould be created- Parameters:
pointer- the pointer to set to the returnedMouseJointAdapter- Returns:
- a new
MouseJointAdapterjust like thisManager'senclosing instance
-
getMax
public byte getMax()- Returns:
- the
max
-
setMax
public void setMax(byte max)- Parameters:
max- themaxto set
-
getAdapters
- Returns:
- the
adapters
-
setAdapters
- Parameters:
adapters- theadaptersto set. If the size of the givenArrayis greater thanmax, it will be increased
-