Class ContainerPrefab
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.ContainerPrefab
Prefab for UI elements that contain other elements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EdgeAlignment
protected boolean
protected Color
protected Direction
protected CanvasGroup.Distribution
protected int
protected DualDimension
Fields inherited from class dev.prozilla.pine.core.entity.prefab.canvas.CanvasElementPrefab
absolutePosition, anchor, position, size
-
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
setAlignment
(EdgeAlignment alignment) void
setArrangeChildren
(boolean arrangeChildren) void
setBackgroundColor
(Color color) void
setDirection
(Direction direction) void
setDistribution
(CanvasGroup.Distribution distribution) void
setGap
(int gap) void
setPadding
(Dimension x, Dimension y) void
setPadding
(DualDimension padding) Methods inherited from class dev.prozilla.pine.core.entity.prefab.canvas.CanvasElementPrefab
setAbsolutePosition, setAnchor, setPosition, setPosition, setSize, setSize
Methods inherited from class dev.prozilla.pine.core.entity.prefab.Prefab
instantiate, instantiate, setActive, setName, setTag
-
Field Details
-
direction
-
alignment
-
distribution
-
backgroundColor
-
gap
protected int gap -
padding
-
arrangeChildren
protected boolean arrangeChildren
-
-
Constructor Details
-
ContainerPrefab
public ContainerPrefab()
-
-
Method Details
-
setDirection
-
setAlignment
-
setBackgroundColor
-
setGap
public void setGap(int gap) -
setPadding
-
setPadding
-
setArrangeChildren
public void setArrangeChildren(boolean arrangeChildren) -
setDistribution
-
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
-