Class ImagePrefab

Direct Known Subclasses:
ImageButtonPrefab

Prefab for images in the UI.
  • Field Details

    • image

      protected TextureBase image
    • cropToRegion

      protected boolean cropToRegion
    • regionX

      protected int regionX
    • regionY

      protected int regionY
    • regionWidth

      protected int regionWidth
    • regionHeight

      protected int regionHeight
  • Constructor Details

    • ImagePrefab

      public ImagePrefab(String imagePath)
    • ImagePrefab

      public ImagePrefab(TextureBase image)
  • Method Details

    • setRegion

      public void setRegion(int x, int y, int width, int height)
    • apply

      protected void apply(Entity entity)
      Description copied from class: Prefab
      Adds this prefab's predefined components to a given entity and copies values from this prefab.
      Overrides:
      apply in class NodePrefab