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
languageLanguageInfovaluestringtranslationTranslation
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
Remarks
Use ColorStrippedIMGUIValueSpan if possible.
ColorStrippedIMGUIValueOffset
Offset into the IMGUIValue string the color-stripped IMGUI value starts.
public int ColorStrippedIMGUIValueOffset { get; }
Property Value
ColorStrippedIMGUIValueSpan
Span of text excluding the background color (IMGUI).
public ReadOnlySpan<char> ColorStrippedIMGUIValueSpan { get; }
Property Value
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
Remarks
Use ColorStrippedValueSpan if possible.
ColorStrippedValueOffset
Offset into the Value string the color-stripped value starts.
public int ColorStrippedValueOffset { get; }
Property Value
ColorStrippedValueSpan
Span of text excluding the background color.
public ReadOnlySpan<char> ColorStrippedValueSpan { get; }
Property Value
IMGUIValue
Value converted to IMGUI compatability. IMGUI uses full color tags instead of the TMPro shortcut.
public string IMGUIValue { get; }
Property Value
Language
Language of translations this value contains.
public LanguageInfo Language { get; }
Property Value
RawValue
The raw value of the translation without pluralization replacements.
public string RawValue { get; }
Property Value
TerminalValue
Value converted to virtual terminal sequences.
public string TerminalValue { get; }
Property Value
Translation
Translation this value belongs to.
public Translation Translation { get; }
Property Value
Value
The value of the translation, with pluralizations replaced with their singular values.
public string Value { get; }
Property Value
Methods
GetValueSpan(bool, bool, bool)
public ReadOnlySpan<char> GetValueSpan(bool useIMGUI, bool useUncoloredTranslation, bool forTerminal)
Parameters
Returns
GetValueString(bool, bool, bool)
public string GetValueString(bool useIMGUI, bool useUncoloredTranslation, bool forTerminal)
Parameters
Returns
SetValue(string)
public void SetValue(string value)
Parameters
valuestring