PixelCrushers.LocalizeUIText Class Reference

Localizes a Unity UI element using a TextTable. More...

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

Public Member Functions

virtual void UpdateText ()
 
virtual void SetFieldName (string newFieldName="")
 Sets the field name, which is the key to use in the TextTable. More...
 
virtual void UpdateDropdownOptions ()
 If changing the Dropdown options, call this afterward to update the localization. More...
 

Protected Member Functions

virtual void Start ()
 
virtual void OnEnable ()
 
virtual string GetLocalizedText (string fieldName)
 

Protected Attributes

bool m_started
 
UnityEngine.UI.Text m_text = null
 
List< string > m_fieldNames = new List<string>()
 
UnityEngine.UI.Dropdown m_dropdown = null
 

Properties

StringField fieldName [get, set]
 If set, use this field name when localizing; otherwise use the initial value of the UI element. More...
 
TextTable textTable [get, set]
 If set, use this table instead of the GlobalTextTable. More...
 

Detailed Description

Localizes a Unity UI element using a TextTable.

Member Function Documentation

◆ GetLocalizedText()

virtual string PixelCrushers.LocalizeUIText.GetLocalizedText ( string  fieldName)
inlineprotectedvirtual

◆ OnEnable()

virtual void PixelCrushers.LocalizeUIText.OnEnable ( )
inlineprotectedvirtual

◆ SetFieldName()

virtual void PixelCrushers.LocalizeUIText.SetFieldName ( string  newFieldName = "")
inlinevirtual

Sets the field name, which is the key to use in the TextTable.

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

Parameters
fieldName

◆ Start()

virtual void PixelCrushers.LocalizeUIText.Start ( )
inlineprotectedvirtual

◆ UpdateDropdownOptions()

virtual void PixelCrushers.LocalizeUIText.UpdateDropdownOptions ( )
inlinevirtual

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

◆ UpdateText()

virtual void PixelCrushers.LocalizeUIText.UpdateText ( )
inlinevirtual

Member Data Documentation

◆ m_dropdown

UnityEngine.UI.Dropdown PixelCrushers.LocalizeUIText.m_dropdown = null
protected

◆ m_fieldNames

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

◆ m_started

bool PixelCrushers.LocalizeUIText.m_started
protected

◆ m_text

UnityEngine.UI.Text PixelCrushers.LocalizeUIText.m_text = null
protected

Property Documentation

◆ fieldName

StringField PixelCrushers.LocalizeUIText.fieldName
getset

If set, use this field name when localizing; otherwise use the initial value of the UI element.

◆ textTable

TextTable PixelCrushers.LocalizeUIText.textTable
getset

If set, use this table instead of the GlobalTextTable.


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