Class ImagePrefab
java.lang.Object
dev.prozilla.pine.core.entity.prefab.Prefab
dev.prozilla.pine.core.entity.prefab.canvas.CanvasElementPrefab
dev.prozilla.pine.core.entity.prefab.canvas.ImagePrefab
- Direct Known Subclasses:
ImageButtonPrefab
Prefab for images in the UI.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Color
protected boolean
protected Texture
protected int
protected int
protected int
protected int
protected DualDimension
Fields inherited from class dev.prozilla.pine.core.entity.prefab.canvas.CanvasElementPrefab
absolutePosition, anchor, position
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds this prefab's predefined components to a given entity and copies values from this prefab.void
void
setRegion
(int x, int y, int width, int height) void
void
setSize
(DualDimension size) Sets the size of this element on the canvas.Methods inherited from class dev.prozilla.pine.core.entity.prefab.canvas.CanvasElementPrefab
setAbsolutePosition, setAnchor, setPosition, setPosition, setSize
Methods inherited from class dev.prozilla.pine.core.entity.prefab.Prefab
instantiate, instantiate, setActive, setName, setTag
-
Field Details
-
image
-
color
-
size
-
cropToRegion
protected boolean cropToRegion -
regionX
protected int regionX -
regionY
protected int regionY -
regionWidth
protected int regionWidth -
regionHeight
protected int regionHeight
-
-
Constructor Details
-
ImagePrefab
-
ImagePrefab
-
-
Method Details
-
setColor
-
setSize
-
setSize
Description copied from class:CanvasElementPrefab
Sets the size of this element on the canvas.- Overrides:
setSize
in classCanvasElementPrefab
-
setRegion
public void setRegion(int x, int y, int width, int height) -
apply
Description copied from class:Prefab
Adds this prefab's predefined components to a given entity and copies values from this prefab.- Overrides:
apply
in classCanvasElementPrefab
-