(84bcafc68) Added "text picker menu" to ItemMsgs, replace """ with a quotation mark in texts

This commit is contained in:
Joonas Rikkonen
2019-04-15 12:08:39 +03:00
parent 21a1b05ae7
commit 45be409a84
3 changed files with 21 additions and 1 deletions
@@ -190,7 +190,7 @@ namespace Barotrauma.Items.Components
get { return name; } get { return name; }
} }
[Editable, Serialize("", true)] [Editable, Serialize("", true, translationTextTag: "ItemMsg")]
public string Msg public string Msg
{ {
get; get;
@@ -204,6 +204,25 @@ namespace Barotrauma
} }
} }
public string DisplayName
{
get;
private set;
}
private string roomName;
[Editable, Serialize("", true, translationTextTag: "RoomName.")]
public string RoomName
{
get { return roomName; }
set
{
if (roomName == value) { return; }
roomName = value;
DisplayName = TextManager.Get(roomName, returnNull: true) ?? roomName;
}
}
public override Rectangle Rect public override Rectangle Rect
{ {
get get
@@ -37,6 +37,7 @@ namespace Barotrauma
text = text.Replace("&", "&"); text = text.Replace("&", "&");
text = text.Replace("&lt;", "<"); text = text.Replace("&lt;", "<");
text = text.Replace("&gt;", ">"); text = text.Replace("&gt;", ">");
text = text.Replace("&quot;", "\"");
infoList.Add(text); infoList.Add(text);
} }
} }