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 booleanprotected TextureAssetprotected intprotected intprotected intprotected intFields inherited from class dev.prozilla.pine.core.entity.prefab.ui.NodePrefab
absolutePosition, anchor, autoFocus, backgroundColor, border, borderColor, borderImage, borderImageSlice, borderImageSliceFill, classes, color, htmlTag, margin, padding, passThrough, size, styleSheet, tabIndex, tooltipText -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds this prefab's predefined components to a given entity and copies values from this prefab.voidsetImage(TextureAsset image) voidsetRegion(int x, int y, int width, int height) Methods inherited from class dev.prozilla.pine.core.entity.prefab.ui.NodePrefab
addClass, addClasses, setAbsolutePosition, setAnchor, setAutoFocus, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBorderImage, setBorderImage, setColor, setColor, setDefaultPropertyValue, setHTMLTag, setMargin, setMargin, setMargin, setPadding, setPadding, setPadding, setPassThrough, setSize, setSize, setSize, setStyleSheet, setStyleSheet, setTabIndex, setTooltipTextMethods inherited from class dev.prozilla.pine.core.entity.prefab.Prefab
addChild, addChildren, addChildren, instantiate, instantiate, removeChild, 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
-
setImage
-
setRegion
public void setRegion(int x, int y, int width, int height) -
apply
Description copied from class:PrefabAdds this prefab's predefined components to a given entity and copies values from this prefab.- Overrides:
applyin classNodePrefab
-