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()
byte
getMax()
boolean
mouseMoved(int screenX, int screenY)
callsmouseMoved
on alladapters
MouseJointAdapter
newMouseJointAdapter(byte pointer)
override this to define how newMouseJointAdapters
should be createdvoid
setAdapters(com.badlogic.gdx.utils.Array<MouseJointAdapter> adapters)
void
setMax(byte max)
boolean
touchDown(int screenX, int screenY, int pointer, int button)
callstouchDown
on alladapters
and creates a new one if necessaryboolean
touchDragged(int screenX, int screenY, int pointer)
callstouchDragged
on alladapters
boolean
touchUp(int screenX, int screenY, int pointer, int button)
callstouchUp
on alladapters
Methods inherited from class com.badlogic.gdx.InputAdapter
keyDown, keyTyped, keyUp, scrolled
Methods 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)callstouchDown
on alladapters
and creates a new one if necessary- Specified by:
touchDown
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
touchDown
in classcom.badlogic.gdx.InputAdapter
-
touchDragged
public boolean touchDragged(int screenX, int screenY, int pointer)callstouchDragged
on alladapters
- Specified by:
touchDragged
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
touchDragged
in classcom.badlogic.gdx.InputAdapter
-
mouseMoved
public boolean mouseMoved(int screenX, int screenY)callsmouseMoved
on alladapters
- Specified by:
mouseMoved
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
mouseMoved
in classcom.badlogic.gdx.InputAdapter
-
touchUp
public boolean touchUp(int screenX, int screenY, int pointer, int button)callstouchUp
on alladapters
- Specified by:
touchUp
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
touchUp
in classcom.badlogic.gdx.InputAdapter
-
newMouseJointAdapter
override this to define how newMouseJointAdapters
should be created- Parameters:
pointer
- the pointer to set to the returnedMouseJointAdapter
- Returns:
- a new
MouseJointAdapter
just like thisManager's
enclosing instance
-
getMax
public byte getMax()- Returns:
- the
max
-
setMax
public void setMax(byte max)- Parameters:
max
- themax
to set
-
getAdapters
- Returns:
- the
adapters
-
setAdapters
- Parameters:
adapters
- theadapters
to set. If the size of the givenArray
is greater thanmax
, it will be increased
-