(8c44620c0) Optimized dynamic font loading (don't get existing texture date with GetData every time a new symbol needs to be rendered, but save the pixel buffer and add to it as needed)

This commit is contained in:
Joonas Rikkonen
2019-05-16 07:00:33 +03:00
parent 531c572216
commit 674b845e9b
10 changed files with 129 additions and 46 deletions
@@ -15,6 +15,8 @@ namespace Barotrauma
public static List<Hull> hullList = new List<Hull>();
public static List<EntityGrid> EntityGrids { get; } = new List<EntityGrid>();
public static bool ShowHulls = true;
public static bool EditWater, EditFire;
public const float OxygenDistributionSpeed = 500.0f;
public const float OxygenDeteriorationSpeed = 0.3f;
@@ -208,6 +210,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
{
get