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 void
act(float delta)
changesCircularGroup.angleOffset
according tovelocity
and reducesvelocity
according todeceleration
void
drag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer)
void
dragStart(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer)
void
dragStop(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer)
float
getDeceleration()
float
getMaxAbsDelta()
float
getVelocity()
boolean
isDraggingActivated()
boolean
isVelocityActivated()
void
setDeceleration(float deceleration)
void
setDraggingActivated(boolean draggingActivated)
void
setMaxAbsDelta(float maxAbsDelta)
void
setVelocity(float velocity)
void
setVelocityActivated(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, touchUp
Methods inherited from class com.badlogic.gdx.scenes.scene2d.InputListener
enter, exit, handle, keyDown, keyTyped, keyUp, mouseMoved, scrolled
Methods 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:
dragStart
in 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:
drag
in 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:
dragStop
in classcom.badlogic.gdx.scenes.scene2d.utils.DragListener
-
act
public void act(float delta)changesCircularGroup.angleOffset
according tovelocity
and reducesvelocity
according todeceleration
- Parameters:
delta
- seeGraphics.getDeltaTime()
-
isVelocityActivated
public boolean isVelocityActivated()- Returns:
- the
velocityActivated
-
setVelocityActivated
public void setVelocityActivated(boolean velocityActivated)- Parameters:
velocityActivated
- thevelocityActivated
to set
-
isDraggingActivated
public boolean isDraggingActivated()- Returns:
- the
draggingActivated
-
setDraggingActivated
public void setDraggingActivated(boolean draggingActivated)- Parameters:
draggingActivated
- thedraggingActivated
to set
-
getVelocity
public float getVelocity()- Returns:
- the
velocity
-
setVelocity
public void setVelocity(float velocity)- Parameters:
velocity
- thevelocity
to set
-
getDeceleration
public float getDeceleration()- Returns:
- the
deceleration
-
setDeceleration
public void setDeceleration(float deceleration)- Parameters:
deceleration
- thedeceleration
to set
-
getMaxAbsDelta
public float getMaxAbsDelta()- Returns:
- the
maxAbsDelta
-
setMaxAbsDelta
public void setMaxAbsDelta(float maxAbsDelta)- Parameters:
maxAbsDelta
- themaxAbsDelta
to set
-