java.lang.Object
technology.sola.engine.graphics.gui.style.BaseStyles
technology.sola.engine.graphics.gui.elements.TextStyles
- Direct Known Subclasses:
TextInputStyles
TextStyles extends
BaseStyles
properties by adding extra properties for rendering text.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
TextStyles.Builder<Self extends TextStyles.Builder<Self>>
Builder class forTextStyles
.static enum
TextAlignment informs where text should be rendered within its available rendering space. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TextStyles
(TextStyles.Builder<?> builder) PopulatesTextStyles
properties from itsTextStyles.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionstatic TextStyles.Builder<?>
create()
Convenience method for creating a newTextStyles.Builder
.@Nullable String
@Nullable TextStyles.TextAlignment
@Nullable Color
Methods inherited from class technology.sola.engine.graphics.gui.style.BaseStyles
background, border, crossAxisChildren, direction, gap, height, mainAxisChildren, padding, position, visibility, width
-
Constructor Details
-
TextStyles
PopulatesTextStyles
properties from itsTextStyles.Builder
.- Parameters:
builder
- the builder to build styles from
-
-
Method Details
-
create
Convenience method for creating a newTextStyles.Builder
.- Returns:
- a new builder instance
-
textColor
- Returns:
- the
Color
of the text to be rendered
-
textAlignment
- Returns:
- the
TextStyles.TextAlignment
of the text
-
fontAssetId
- Returns:
- the id of the
Font
asset used for rendering
-