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)
    changes CircularGroup.angleOffset according to velocity and reduces velocity according to deceleration
    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
     
    float
     
    float
     
    boolean
     
    boolean
     
    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 class com.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 class com.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 class com.badlogic.gdx.scenes.scene2d.utils.DragListener
    • act

      public void act(float delta)
      changes CircularGroup.angleOffset according to velocity and reduces velocity according to deceleration
      Parameters:
      delta - see Graphics.getDeltaTime()
    • isVelocityActivated

      public boolean isVelocityActivated()
      Returns:
      the velocityActivated
    • setVelocityActivated

      public void setVelocityActivated(boolean velocityActivated)
      Parameters:
      velocityActivated - the velocityActivated to set
    • isDraggingActivated

      public boolean isDraggingActivated()
      Returns:
      the draggingActivated
    • setDraggingActivated

      public void setDraggingActivated(boolean draggingActivated)
      Parameters:
      draggingActivated - the draggingActivated to set
    • getVelocity

      public float getVelocity()
      Returns:
      the velocity
    • setVelocity

      public void setVelocity(float velocity)
      Parameters:
      velocity - the velocity to set
    • getDeceleration

      public float getDeceleration()
      Returns:
      the deceleration
    • setDeceleration

      public void setDeceleration(float deceleration)
      Parameters:
      deceleration - the deceleration to set
    • getMaxAbsDelta

      public float getMaxAbsDelta()
      Returns:
      the maxAbsDelta
    • setMaxAbsDelta

      public void setMaxAbsDelta(float maxAbsDelta)
      Parameters:
      maxAbsDelta - the maxAbsDelta to set