Class TextButtonPrefab
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.TextPrefab
dev.prozilla.pine.core.entity.prefab.canvas.TextButtonPrefab
Prefab for text buttons in the UI.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Color
protected Color
protected ButtonData.ClickCallback
protected Color
protected DualDimension
Fields inherited from class dev.prozilla.pine.core.entity.prefab.canvas.TextPrefab
color, font, text
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
setBackgroundColor
(Color color) void
setBackgroundColors
(Color normal, Color hover) void
setBackgroundHoverColor
(Color color) void
setClickCallback
(ButtonData.ClickCallback callback) void
setPadding
(Dimension x, Dimension y) void
setPadding
(DualDimension padding) void
setTextColor
(Color color) void
setTextColors
(Color normal, Color hover) void
setTextHoverColor
(Color color) Methods inherited from class dev.prozilla.pine.core.entity.prefab.canvas.TextPrefab
setColor, setFont, setFont, setText
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
-
hoverColor
-
backgroundHoverColor
-
backgroundColor
-
padding
-
clickCallback
-
-
Constructor Details
-
TextButtonPrefab
public TextButtonPrefab() -
TextButtonPrefab
-
-
Method Details
-
setPadding
-
setPadding
-
setClickCallback
-
setTextColors
-
setTextColor
-
setTextHoverColor
-
setBackgroundColors
-
setBackgroundColor
-
setBackgroundHoverColor
-
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 classTextPrefab
-