(32ba1d322) When editing an item label or a room name, the text is colored gray/green according to whether the text can be translated (= if a matching text tag is found in the language files). There's also now a "text picker menu" that can be used to pick the text from a list of translatable texts. TODO: use this in ItemComponent.Msg and CustomInterface button/tickbox labels.
This commit is contained in:
@@ -55,11 +55,20 @@ namespace Barotrauma
|
||||
{
|
||||
public object defaultValue;
|
||||
public bool isSaveable;
|
||||
public string translationTextTag;
|
||||
|
||||
public Serialize(object defaultValue, bool isSaveable)
|
||||
/// <summary>
|
||||
/// Makes the property serializable to/from XML
|
||||
/// </summary>
|
||||
/// <param name="defaultValue">The property is set to this value during deserialization if the value is not defined in XML.</param>
|
||||
/// <param name="isSaveable">Is the value saved to XML when serializing.</param>
|
||||
/// <param name="translationTextTag">If set to anything else than null, SerializableEntityEditors will show what the text gets translated to or warn if the text is not found in the language files.
|
||||
/// Setting the value to a non-empty string will let the user select the text from one whose tag starts with the given string (e.g. RoomName. would show all texts with a RoomName.* tag)</param>
|
||||
public Serialize(object defaultValue, bool isSaveable, string translationTextTag = null)
|
||||
{
|
||||
this.defaultValue = defaultValue;
|
||||
this.isSaveable = isSaveable;
|
||||
this.translationTextTag = translationTextTag;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user