Class CircularGroup.DragManager
java.lang.Object
com.badlogic.gdx.scenes.scene2d.InputListener
com.badlogic.gdx.scenes.scene2d.utils.DragListener
net.dermetfan.gdx.scenes.scene2d.ui.CircularGroup.DragManager
- All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.EventListener
- Enclosing class:
- CircularGroup
public class CircularGroup.DragManager
extends com.badlogic.gdx.scenes.scene2d.utils.DragListener
manages dragging and velocity of its enclosing CircularGroup instance
- Since:
- 0.5.0
-
Method Summary
Modifier and Type Method Description voidact(float delta)changesCircularGroup.angleOffsetaccording tovelocityand reducesvelocityaccording todecelerationvoiddrag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer)voiddragStart(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer)voiddragStop(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer)floatgetDeceleration()floatgetMaxAbsDelta()floatgetVelocity()booleanisDraggingActivated()booleanisVelocityActivated()voidsetDeceleration(float deceleration)voidsetDraggingActivated(boolean draggingActivated)voidsetMaxAbsDelta(float maxAbsDelta)voidsetVelocity(float velocity)voidsetVelocityActivated(boolean velocityActivated)Methods inherited from class com.badlogic.gdx.scenes.scene2d.utils.DragListener
cancel, getButton, getDeltaX, getDeltaY, getDragDistance, getDragStartX, getDragStartY, getDragX, getDragY, getStageTouchDownX, getStageTouchDownY, getTapSquareSize, getTouchDownX, getTouchDownY, isDragging, setButton, setDragStartX, setDragStartY, setTapSquareSize, touchDown, touchDragged, touchUpMethods inherited from class com.badlogic.gdx.scenes.scene2d.InputListener
enter, exit, handle, keyDown, keyTyped, keyUp, mouseMoved, scrolledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
dragStart
public void dragStart(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer)- Overrides:
dragStartin classcom.badlogic.gdx.scenes.scene2d.utils.DragListener
-
drag
public void drag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer)- Overrides:
dragin classcom.badlogic.gdx.scenes.scene2d.utils.DragListener
-
dragStop
public void dragStop(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer)- Overrides:
dragStopin classcom.badlogic.gdx.scenes.scene2d.utils.DragListener
-
act
public void act(float delta)changesCircularGroup.angleOffsetaccording tovelocityand reducesvelocityaccording todeceleration- Parameters:
delta- seeGraphics.getDeltaTime()
-
isVelocityActivated
public boolean isVelocityActivated()- Returns:
- the
velocityActivated
-
setVelocityActivated
public void setVelocityActivated(boolean velocityActivated)- Parameters:
velocityActivated- thevelocityActivatedto set
-
isDraggingActivated
public boolean isDraggingActivated()- Returns:
- the
draggingActivated
-
setDraggingActivated
public void setDraggingActivated(boolean draggingActivated)- Parameters:
draggingActivated- thedraggingActivatedto set
-
getVelocity
public float getVelocity()- Returns:
- the
velocity
-
setVelocity
public void setVelocity(float velocity)- Parameters:
velocity- thevelocityto set
-
getDeceleration
public float getDeceleration()- Returns:
- the
deceleration
-
setDeceleration
public void setDeceleration(float deceleration)- Parameters:
deceleration- thedecelerationto set
-
getMaxAbsDelta
public float getMaxAbsDelta()- Returns:
- the
maxAbsDelta
-
setMaxAbsDelta
public void setMaxAbsDelta(float maxAbsDelta)- Parameters:
maxAbsDelta- themaxAbsDeltato set
-