|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop
public class DragAndDrop
Manages drag and drop operations through registered drag sources and drop targets.
Nested Class Summary | |
---|---|
static class |
DragAndDrop.Payload
The payload of a drag and drop operation. |
static class |
DragAndDrop.Source
A target where a payload can be dragged from. |
static class |
DragAndDrop.Target
A target where a payload can be dropped to. |
Constructor Summary | |
---|---|
DragAndDrop()
|
Method Summary | |
---|---|
void |
addSource(DragAndDrop.Source source)
|
void |
addTarget(DragAndDrop.Target target)
|
Actor |
getDragActor()
Returns the current drag actor, or null. |
boolean |
isDragging()
|
void |
removeSource(DragAndDrop.Source source)
|
void |
removeTarget(DragAndDrop.Target target)
|
void |
setButton(int button)
Sets the button to listen for, all other buttons are ignored. |
void |
setDragActorPosition(float dragActorX,
float dragActorY)
|
void |
setDragTime(int dragMillis)
Time in milliseconds that a drag must take before a drop will be considered valid. |
void |
setTapSquareSize(float halfTapSquareSize)
Sets the distance a touch must travel before being considered a drag. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DragAndDrop()
Method Detail |
---|
public void addSource(DragAndDrop.Source source)
public void removeSource(DragAndDrop.Source source)
public void addTarget(DragAndDrop.Target target)
public void removeTarget(DragAndDrop.Target target)
public void setTapSquareSize(float halfTapSquareSize)
public void setButton(int button)
Input.Buttons.LEFT
. Use -1 for any button.
public void setDragActorPosition(float dragActorX, float dragActorY)
public boolean isDragging()
public Actor getDragActor()
public void setDragTime(int dragMillis)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |