PixelCrushers.DialogueSystem.LocalizeUIText Class Reference

This script localizes the content of the Text element or Dropdown element on this GameObject. More...

Inheritance diagram for PixelCrushers.DialogueSystem.LocalizeUIText:
Collaboration diagram for PixelCrushers.DialogueSystem.LocalizeUIText:

Public Member Functions

virtual void LocalizeText ()
 
virtual void UpdateFieldName (string newFieldName="")
 Sets the field name, which is the key to use in the localized text table. More...
 
virtual void UpdateOptions ()
 If changing the Dropdown options, call this afterward to update the localization. More...
 

Public Attributes

LocalizedTextTable localizedTextTable
 
string fieldName = string.Empty
 

Protected Member Functions

virtual void Start ()
 
virtual void OnEnable ()
 
virtual bool HasCurrentLanguage ()
 

Protected Attributes

UnityEngine.UI.Text text = null
 
List< string > fieldNames = new List<string>()
 
bool started = false
 
UnityEngine.UI.Dropdown dropdown = null
 

Detailed Description

This script localizes the content of the Text element or Dropdown element on this GameObject.

You can assign the localized text table to this script or the Dialogue Manager. The element's starting text value(s) serves as the field name(s) to look up in the table.

Member Function Documentation

◆ HasCurrentLanguage()

virtual bool PixelCrushers.DialogueSystem.LocalizeUIText.HasCurrentLanguage ( )
protectedvirtual

◆ LocalizeText()

virtual void PixelCrushers.DialogueSystem.LocalizeUIText.LocalizeText ( )
virtual

◆ OnEnable()

virtual void PixelCrushers.DialogueSystem.LocalizeUIText.OnEnable ( )
protectedvirtual

◆ Start()

virtual void PixelCrushers.DialogueSystem.LocalizeUIText.Start ( )
protectedvirtual

◆ UpdateFieldName()

virtual void PixelCrushers.DialogueSystem.LocalizeUIText.UpdateFieldName ( string  newFieldName = "")
virtual

Sets the field name, which is the key to use in the localized text table.

By default, the field name is the initial value of the Text component.

Parameters
fieldName

Reimplemented in PixelCrushers.DialogueSystem.TextMeshPro.LocalizeTextMeshPro, and PixelCrushers.DialogueSystem.LocalizeTextMesh.

◆ UpdateOptions()

virtual void PixelCrushers.DialogueSystem.LocalizeUIText.UpdateOptions ( )
virtual

If changing the Dropdown options, call this afterward to update the localization.

Member Data Documentation

◆ dropdown

UnityEngine.UI.Dropdown PixelCrushers.DialogueSystem.LocalizeUIText.dropdown = null
protected

◆ fieldName

string PixelCrushers.DialogueSystem.LocalizeUIText.fieldName = string.Empty

◆ fieldNames

List<string> PixelCrushers.DialogueSystem.LocalizeUIText.fieldNames = new List<string>()
protected

◆ localizedTextTable

LocalizedTextTable PixelCrushers.DialogueSystem.LocalizeUIText.localizedTextTable

◆ started

bool PixelCrushers.DialogueSystem.LocalizeUIText.started = false
protected

◆ text

UnityEngine.UI.Text PixelCrushers.DialogueSystem.LocalizeUIText.text = null
protected

The documentation for this class was generated from the following file: