Show / Hide Table of Contents

Method ApplyTextStyle

| Edit this page View Source

ApplyTextStyle(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
GUIManager.Instance.AveriaSerifBold
/
GUIManager.Instance.AveriaSerif
Color color Custom color or
GUIManager.Instance.ValheimOrange
int fontSize Optional font size, defaults to 16
bool createOutline creates an Outline component when true
| Edit this page View Source

ApplyTextStyle(Text, Color, int, bool)

Apply Valheim style to a Text Component. Uses
GUIManager.Instance.AveriaSerifBold
by default
Declaration
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
GUIManager.Instance.ValheimOrange
int fontSize Optional font size, defaults to 16
bool createOutline creates an Outline component when true
| Edit this page View Source

ApplyTextStyle(Text, int)

Apply Valheim style to a Text Component. Uses
GUIManager.Instance.AveriaSerifBold
,
Color.white
and creates an outline by default
Declaration
public void ApplyTextStyle(Text text, int fontSize = 16)
Parameters
Type Name Description
Text text Target component
int fontSize Optional font size, defaults to 16
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾