Method ApplyTextStyle
| Edit this page View SourceApplyTextStyle(Text, Font, Color, int, bool)
Apply Valheim style to a Text Component
Declaration
public void ApplyTextStyle(Text text, Font font, Color color, int fontSize = 16, bool createOutline = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Text | text | Target component |
| Font | font | Own font or / |
| Color | color | Custom color or |
| int | fontSize | Optional font size, defaults to 16 |
| bool | createOutline | creates an Outline component when true |
ApplyTextStyle(Text, Color, int, bool)
Apply Valheim style to a Text Component.
Uses
GUIManager.Instance.AveriaSerifBold by defaultDeclaration
public void ApplyTextStyle(Text text, Color color, int fontSize = 16, bool createOutline = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Text | text | Target component |
| Color | color | Custom color or |
| int | fontSize | Optional font size, defaults to 16 |
| bool | createOutline | creates an Outline component when true |
ApplyTextStyle(Text, int)
Apply Valheim style to a Text Component.
Uses
GUIManager.Instance.AveriaSerifBold, Color.white and creates an outline by defaultDeclaration
public void ApplyTextStyle(Text text, int fontSize = 16)
Parameters
| Type | Name | Description |
|---|---|---|
| Text | text | Target component |
| int | fontSize | Optional font size, defaults to 16 |