Table of Contents

Class TranslationValue

Namespace
Uncreated.Warfare.Translations
Assembly
Uncreated.Warfare.dll

This class stores the actual values for each language.

public class TranslationValue
Inheritance
TranslationValue
Inherited Members

Constructors

TranslationValue(LanguageInfo, string, Translation)

public TranslationValue(LanguageInfo language, string value, Translation translation)

Parameters

language LanguageInfo
value string
translation Translation

Properties

Color

Background color for the message used for sending chat messages, defaulting to white.

public Color Color { get; }

Property Value

Color

ColorStrippedIMGUIValue

Value converted to IMGUI compatability with the outer color span removed. IMGUI uses full color tags instead of the TMPro shortcut.

public string ColorStrippedIMGUIValue { get; }

Property Value

string

Remarks

Use ColorStrippedIMGUIValueSpan if possible.

ColorStrippedIMGUIValueOffset

Offset into the IMGUIValue string the color-stripped IMGUI value starts.

public int ColorStrippedIMGUIValueOffset { get; }

Property Value

int

ColorStrippedIMGUIValueSpan

Span of text excluding the background color (IMGUI).

public ReadOnlySpan<char> ColorStrippedIMGUIValueSpan { get; }

Property Value

ReadOnlySpan<char>

ColorStrippedValue

The value of the translation, with pluralizations replaced with their singular values and the outer color span removed.

public string ColorStrippedValue { get; }

Property Value

string

Remarks

Use ColorStrippedValueSpan if possible.

ColorStrippedValueOffset

Offset into the Value string the color-stripped value starts.

public int ColorStrippedValueOffset { get; }

Property Value

int

ColorStrippedValueSpan

Span of text excluding the background color.

public ReadOnlySpan<char> ColorStrippedValueSpan { get; }

Property Value

ReadOnlySpan<char>

IMGUIValue

Value converted to IMGUI compatability. IMGUI uses full color tags instead of the TMPro shortcut.

public string IMGUIValue { get; }

Property Value

string

Language

Language of translations this value contains.

public LanguageInfo Language { get; }

Property Value

LanguageInfo

RawValue

The raw value of the translation without pluralization replacements.

public string RawValue { get; }

Property Value

string

TerminalValue

Value converted to virtual terminal sequences.

public string TerminalValue { get; }

Property Value

string

Translation

Translation this value belongs to.

public Translation Translation { get; }

Property Value

Translation

Value

The value of the translation, with pluralizations replaced with their singular values.

public string Value { get; }

Property Value

string

Methods

GetValueSpan(bool, bool, bool)

public ReadOnlySpan<char> GetValueSpan(bool useIMGUI, bool useUncoloredTranslation, bool forTerminal)

Parameters

useIMGUI bool
useUncoloredTranslation bool
forTerminal bool

Returns

ReadOnlySpan<char>

GetValueString(bool, bool, bool)

public string GetValueString(bool useIMGUI, bool useUncoloredTranslation, bool forTerminal)

Parameters

useIMGUI bool
useUncoloredTranslation bool
forTerminal bool

Returns

string

SetValue(string)

public void SetValue(string value)

Parameters

value string