Class ImagePrefab
java.lang.Object
dev.prozilla.pine.core.entity.prefab.Prefab
dev.prozilla.pine.core.entity.prefab.ui.NodePrefab
dev.prozilla.pine.core.entity.prefab.ui.ImagePrefab
- Direct Known Subclasses:
ImageButtonPrefab
@Components({ImageNode.class,Node.class,Transform.class})
public class ImagePrefab
extends NodePrefab
Prefab for images in the UI.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected TextureBase
protected int
protected int
protected int
protected int
Fields inherited from class dev.prozilla.pine.core.entity.prefab.ui.NodePrefab
absolutePosition, anchor, backgroundColor, border, borderImage, borderImageSlice, borderImageSliceFill, classes, color, margin, padding, passThrough, position, size, styleSheet, tooltipText
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class dev.prozilla.pine.core.entity.prefab.ui.NodePrefab
addClass, addClasses, setAbsolutePosition, setAnchor, setBackgroundColor, setBackgroundColor, setBorder, setBorderImage, setColor, setColor, setDefaultPropertyValue, setMargin, setMargin, setMargin, setPadding, setPadding, setPadding, setPassThrough, setSize, setSize, setSize, setStyleSheet, setStyleSheet, setTooltipText
Methods inherited from class dev.prozilla.pine.core.entity.prefab.Prefab
instantiate, instantiate, setActive, setName, setTag
-
Field Details
-
image
-
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
-
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 classNodePrefab
-