Skip to main content

UI Theme

Description​

A theme is a DialogueUiTheme asset holding every sprite, colour, font, and size the dialogue UI uses, split into five blocks. Applying a theme walks the prompt and panel views and pushes those values into them.

Themes are applied through Dialogue UI Service; DialogueUiThemeService is the static helper that resolves which theme applies. See UI and Theming.

IDialogueUiTheme​

PropertyTypeCovers
PromptDialoguePromptThemeDataThe interact prompt.
SpeechDialogueSpeechThemeDataThe panel background and the speech text.
OptionsDialogueOptionsThemeDataThe option list, selected and unselected.
ProgressDialogueProgressThemeDataThe countdown progress bar.
SharedDialogueSharedThemeDataFallback font and size for anything unset.

DialogueUiThemeService​

A static helper. It reads settings; it does not apply anything.

NameParametersReturn TypeDescription
GetSettingsN/AModuleSettingsThe dialogue module settings asset.
GetUiSettingsN/ADialogueUiSettingsDataThe UI section of module settings.
GetModuleDefaultThemeN/ADialogueUiThemeThe default theme configured in module settings.
ResolveThemeIDialogueUiTheme explicitOverride = nullIDialogueUiThemeReturns the override if given, otherwise the module default.

DialoguePromptThemeData​

FieldTypeDefault
backgroundSpriteSpritenone
backgroundColorColorwhite
textColorColorblack
keyTextColorColorblack
fontAssetTMP_FontAssetnone
fontSizeint36
defaultPromptTextstringPress '{0}' to chat
interactionKeyLabelstringX

defaultPromptText is a format string; {0} is replaced with the resolved binding label for the current device, so a gamepad shows its own button rather than X.

DialogueSpeechThemeData​

FieldTypeDefault
panelBackgroundSpriteSpritenone
panelImageTypeImage.TypeSimple
panelFillCenterbooltrue
panelBackgroundColorColorblack, 39% alpha
speechBackgroundSpriteSpritenone
speechImageTypeImage.TypeSimple
speechFillCenterbooltrue
speechBackgroundColorColortransparent
speakerNameColorColorwhite
speechTextColorColorwhite
nameFontAssetTMP_FontAssetnone
bodyFontAssetTMP_FontAssetnone
nameFontSizeint36
bodyFontSizeint36

The Image.Type and fill-centre pairs exist so a nine-sliced panel sprite renders correctly; set the image type to Sliced when using one.

DialogueOptionsThemeData​

FieldTypeDefault
optionBackgroundSpriteSpritenone
selectedOptionBackgroundSpriteSpritenone
selectedOptionImageTypeImage.TypeSimple
selectedOptionFillCenterbooltrue
selectedMarkerSpriteSpritenone
optionBackgroundColorColortransparent
selectedOptionBackgroundColorColorblack, 39% alpha
optionTextColorColorwhite
selectedOptionTextColorColorwhite
optionFontAssetTMP_FontAssetnone
optionFontSizeint36
verticalSpacingfloat0
minimumHeightfloat60

DialogueProgressThemeData​

FieldTypeDefault
frameSpriteSpritenone
frameImageTypeImage.TypeSimple
frameFillCenterbooltrue
fillSpriteSpritenone
fillImageTypeImage.TypeSimple
capSpriteSpritenone
frameColorColorwhite
fillColorColorwhite
capColorColorwhite
defaultVisibleboolfalse

defaultVisible decides whether the bar shows outside of a timed option. Leave it off unless the bar is part of your panel's resting look.

DialogueSharedThemeData​

FieldTypeDefault
fallbackFontAssetTMP_FontAssetnone
fallbackFontSizeint36

Used wherever a block leaves its own font unset, so a theme can set one font once rather than in five places.