Class NodePrefab
java.lang.Object
dev.prozilla.pine.core.entity.prefab.Prefab
dev.prozilla.pine.core.entity.prefab.ui.NodePrefab
- Direct Known Subclasses:
FramePrefab
,ImagePrefab
,LayoutPrefab
,TextPrefab
Prefab for UI elements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected GridAlignment
protected Color
protected Dimension
protected TextureBase
protected Vector4f
protected boolean
protected Color
protected DualDimension
protected DualDimension
protected boolean
protected DualDimension
protected DualDimension
protected StyleSheet
protected String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a class to this node.void
addClasses
(String... classNames) Adds multiple classes to this node.protected void
Adds this prefab's predefined components to a given entity and copies values from this prefab.void
setAbsolutePosition
(boolean absolutePosition) IfabsolutePosition
is true, this node will not be affected by layout nodes.void
setAnchor
(GridAlignment anchor) Sets the anchor point of this node.void
setBackgroundColor
(VariableProperty<Color> color) Sets the background color of this node.void
setBackgroundColor
(Color color) Sets the background color of this node.void
void
setBorderImage
(TextureBase borderImage, Vector4f slice, boolean fill) void
setColor
(VariableProperty<Color> color) Sets the foreground color of this node.void
Sets the foreground color of this node.protected <T> void
setDefaultPropertyValue
(StyledPropertyKey<T> propertyName, AdaptiveProperty<T> value) void
void
setMargin
(DualDimension margin) void
setMargin
(VariableProperty<DualDimension> margin) void
Sets the padding around the content of this node.void
setPadding
(DualDimension padding) Sets the padding around the content of this node.void
setPadding
(VariableProperty<DualDimension> padding) Sets the padding around the content of this node.void
setPassThrough
(boolean passThrough) IfpassThrough
is true, the cursor will not interact with this node.void
Sets the size of this node.void
setSize
(DualDimension size) Sets the size of this node.void
setSize
(VariableProperty<DualDimension> size) Sets the size of this node.void
setStyleSheet
(StyleSheet styleSheet) Sets the style sheet that is applied to this node.void
setStyleSheet
(String filePath) Sets the style sheet that is applied to this node by loading it from a CSS file.void
setTooltipText
(String tooltipText) Sets the text that appears in a tooltip when the cursor hovers over this node.Methods inherited from class dev.prozilla.pine.core.entity.prefab.Prefab
instantiate, instantiate, setActive, setName, setTag
-
Field Details
-
position
-
size
-
padding
-
margin
-
border
-
borderImage
-
borderImageSlice
-
borderImageSliceFill
protected boolean borderImageSliceFill -
color
-
backgroundColor
-
anchor
-
absolutePosition
protected boolean absolutePosition -
passThrough
protected boolean passThrough -
tooltipText
-
classes
-
styleSheet
-
-
Constructor Details
-
NodePrefab
public NodePrefab()
-
-
Method Details
-
setStyleSheet
Sets the style sheet that is applied to this node by loading it from a CSS file. -
setStyleSheet
Sets the style sheet that is applied to this node. -
setSize
Sets the size of this node. -
setSize
Sets the size of this node. -
setSize
Sets the size of this node. -
setPadding
Sets the padding around the content of this node. -
setPadding
Sets the padding around the content of this node. -
setPadding
Sets the padding around the content of this node. -
setMargin
-
setMargin
-
setMargin
-
setColor
Sets the foreground color of this node. -
setColor
Sets the foreground color of this node. -
setBackgroundColor
Sets the background color of this node. -
setBackgroundColor
Sets the background color of this node. -
setAnchor
Sets the anchor point of this node. -
setAbsolutePosition
public void setAbsolutePosition(boolean absolutePosition) IfabsolutePosition
is true, this node will not be affected by layout nodes. -
setPassThrough
public void setPassThrough(boolean passThrough) IfpassThrough
is true, the cursor will not interact with this node. -
setTooltipText
Sets the text that appears in a tooltip when the cursor hovers over this node. -
setBorder
-
setBorderImage
-
addClasses
Adds multiple classes to this node. -
addClass
Adds a class to this node. -
setDefaultPropertyValue
protected <T> void setDefaultPropertyValue(StyledPropertyKey<T> propertyName, AdaptiveProperty<T> value) -
apply
Description copied from class:Prefab
Adds this prefab's predefined components to a given entity and copies values from this prefab.
-