Class CanvasElementPrefab
java.lang.Object
dev.prozilla.pine.core.entity.prefab.Prefab
dev.prozilla.pine.core.entity.prefab.canvas.CanvasElementPrefab
- Direct Known Subclasses:
ContainerPrefab
,FramePrefab
,ImagePrefab
,RectPrefab
,TextPrefab
Prefab for UI elements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected GridAlignment
protected DualDimension
protected DualDimension
-
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
setAbsolutePosition
(boolean absolutePosition) void
setAnchor
(GridAlignment anchor) Sets the anchor point on the canvas.void
Sets the position of this element on the canvas relative to its anchor point.void
setPosition
(DualDimension position) Sets the position of this element on the canvas relative to its anchor point.void
Sets the size of this element on the canvas.void
setSize
(DualDimension size) Sets the size of this element on the canvas.Methods inherited from class dev.prozilla.pine.core.entity.prefab.Prefab
instantiate, instantiate, setActive, setName, setTag
-
Field Details
-
position
-
size
-
anchor
-
absolutePosition
protected boolean absolutePosition
-
-
Constructor Details
-
CanvasElementPrefab
public CanvasElementPrefab()
-
-
Method Details
-
setPosition
Sets the position of this element on the canvas relative to its anchor point. -
setPosition
Sets the position of this element on the canvas relative to its anchor point. -
setSize
Sets the size of this element on the canvas. -
setSize
Sets the size of this element on the canvas. -
setAnchor
Sets the anchor point on the canvas. -
setAbsolutePosition
public void setAbsolutePosition(boolean absolutePosition) -
apply
Description copied from class:Prefab
Adds this prefab's predefined components to a given entity and copies values from this prefab.
-