(de26bb46c) AutoScale CustomInterface texts to prevent overflows

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:43:54 +03:00
parent 3153771cc7
commit 49b0ee7c50
30 changed files with 333 additions and 349 deletions
@@ -36,6 +36,7 @@ namespace Barotrauma.Items.Components
{
UserData = ciElement
};
tickBox.TextBlock.AutoScale = true;
tickBox.OnSelected += (tBox) =>
{
if (GameMain.Client == null)
@@ -57,6 +58,7 @@ namespace Barotrauma.Items.Components
{
UserData = ciElement
};
btn.TextBlock.AutoScale = true;
btn.OnClicked += (_, userdata) =>
{
if (GameMain.Client == null)
@@ -1114,8 +1114,10 @@ namespace Barotrauma
//----------------------------------------
var itemPrefab = MapEntityPrefab.Find(itemName, itemIdentifier) as ItemPrefab;
if (itemPrefab == null) return null;
var itemPrefab = string.IsNullOrEmpty(itemIdentifier) ?
MapEntityPrefab.Find(itemName, null, showErrorMessages: false) as ItemPrefab :
MapEntityPrefab.Find(itemName, itemIdentifier, showErrorMessages: false) as ItemPrefab;
if (itemPrefab == null) { return null; }
Inventory inventory = null;