Class QuadActor

All Implemented Interfaces:
Layout

public class QuadActor extends Widget
  • Constructor Details

    • QuadActor

      public QuadActor(float[] vertices, int[] colors)
      Parameters:
      vertices - массив из 8 чисел - позиций вершин четырехугольника. Значения от 0 до 1 { x, y, Bottom Left x, y, Top Left x, y, Top Right x, y Bottom right }
      colors - массив цветов 4 вершин четырехугольника. Значения от 0 до 255 { r, g, b, a, Bottom Left r, g, b, a, Top Left r, g, b, a, Top Right r, g, b, a Bottom right }
    • QuadActor

      public QuadActor(float[] vertices, Color color)
    • QuadActor

      public QuadActor(Color color, float[] positions)
      Сразу задает размеры в пикселях. Ширина и высота будет установлена автоматически
      Parameters:
      positions - массив из 8 чисел - позиций вершин четырехугольника. Значения в пикселях { x, y, Bottom Left x, y, Top Left x, y, Top Right x, y Bottom right }
    • QuadActor

      public QuadActor(Color[] colors, float[] positions)
    • QuadActor

      public QuadActor(float[] vertices, Color bottomLeft, Color topLeft, Color topRight, Color bottomRight)
  • Method Details

    • setTextureRegion

      public void setTextureRegion(TextureRegion region)
    • getTextureRegion

      public TextureRegion getTextureRegion()
    • getVertexPositions

      public float[] getVertexPositions()
    • setVertexPositions

      public void setVertexPositions(float[] positions)
    • setVertices

      public void setVertices(float[] vertices)
    • setVertexColors

      public void setVertexColors(int[] colors)
    • setVertexColors

      public void setVertexColors(Color bottomLeft, Color topLeft, Color topRight, Color bottomRight)
    • setVertexColors

      public void setVertexColors(Color color)
    • draw

      public void draw(Batch batch, float parentAlpha)
      Description copied from class: com.badlogic.gdx.scenes.scene2d.ui.Widget
      If this method is overridden, the super method or Widget.validate() should be called to ensure the widget is laid out.
      Overrides:
      draw in class Widget
      parentAlpha - The parent alpha, to be multiplied with this actor's alpha, allowing the parent's alpha to affect all children.