Class CircularGroup.Modifier.Adapter

java.lang.Object
net.dermetfan.gdx.scenes.scene2d.ui.CircularGroup.Modifier.Adapter
All Implemented Interfaces:
CircularGroup.Modifier
Enclosing interface:
CircularGroup.Modifier

public static class CircularGroup.Modifier.Adapter
extends java.lang.Object
implements CircularGroup.Modifier
Use this if you only want to override some of CircularGroup.Modifier's methods. All method implementations return the default value.
Since:
0.5.0
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.dermetfan.gdx.scenes.scene2d.ui.CircularGroup.Modifier

    CircularGroup.Modifier.Adapter
  • Constructor Summary

    Constructors
    Constructor Description
    Adapter()  
  • Method Summary

    Modifier and Type Method Description
    com.badlogic.gdx.math.Vector2 anchorOffset​(com.badlogic.gdx.math.Vector2 anchorOffset, com.badlogic.gdx.scenes.scene2d.Actor child, int index, int numChildren, CircularGroup group)  
    float angle​(float defaultAngle, com.badlogic.gdx.scenes.scene2d.Actor child, int index, int numChildren, CircularGroup group)  
    com.badlogic.gdx.math.Vector2 localAnchor​(com.badlogic.gdx.math.Vector2 localAnchor, com.badlogic.gdx.scenes.scene2d.Actor child, int index, int numChildren, CircularGroup group)  
    float rotation​(float angle, com.badlogic.gdx.scenes.scene2d.Actor child, int index, int numChildren, CircularGroup group)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Adapter

      public Adapter()
  • Method Details

    • angle

      public float angle​(float defaultAngle, com.badlogic.gdx.scenes.scene2d.Actor child, int index, int numChildren, CircularGroup group)
      Specified by:
      angle in interface CircularGroup.Modifier
      Parameters:
      defaultAngle - the linearly calculated angle of the child for even distribution
      Returns:
      the angle of the child (CircularGroup.angleOffset will be added to this)
    • rotation

      public float rotation​(float angle, com.badlogic.gdx.scenes.scene2d.Actor child, int index, int numChildren, CircularGroup group)
      Specified by:
      rotation in interface CircularGroup.Modifier
      Parameters:
      angle - the angle of the child (from CircularGroup.Modifier.angle(float, Actor, int, int, CircularGroup))
      Returns:
      the rotation of the child
    • anchorOffset

      public com.badlogic.gdx.math.Vector2 anchorOffset​(com.badlogic.gdx.math.Vector2 anchorOffset, com.badlogic.gdx.scenes.scene2d.Actor child, int index, int numChildren, CircularGroup group)
      Specified by:
      anchorOffset in interface CircularGroup.Modifier
      Parameters:
      anchorOffset - the default anchor offset ([0:0])
      Returns:
      the anchor offset of the child, relative to the group center
    • localAnchor

      public com.badlogic.gdx.math.Vector2 localAnchor​(com.badlogic.gdx.math.Vector2 localAnchor, com.badlogic.gdx.scenes.scene2d.Actor child, int index, int numChildren, CircularGroup group)
      Specified by:
      localAnchor in interface CircularGroup.Modifier
      Parameters:
      localAnchor - the default local anchorOffset ([childWidth:childHeight / 2])
      Returns:
      the local anchorOffset of the child, relative to the child itself