(e42047dc1) Tester's build, January 30th 2020

This commit is contained in:
Juan Pablo Arce
2020-01-30 15:56:31 -03:00
parent eaa18a20a3
commit 15499cb704
203 changed files with 8274 additions and 4950 deletions
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System.Linq;
@@ -6,8 +7,6 @@ namespace Barotrauma
{
partial class ItemInventory : Inventory
{
private string uiLabel;
protected override void ControlInput(Camera cam)
{
base.ControlInput(cam);
@@ -75,30 +74,7 @@ namespace Barotrauma
0.0f, UIScale);
}
if (container.InventoryTopSprite == null)
{
if (uiLabel == null || uiLabel == string.Empty)
{
if (container.UILabel != null && container.UILabel.Length > 0)
{
uiLabel = TextManager.Get("UILabel." + container.UILabel);
}
else
{
Item item = Owner as Item;
uiLabel = item?.Name;
}
}
if (!string.IsNullOrEmpty(uiLabel) && !subInventory)
{
uiLabel = ToolBox.WrapText(uiLabel, BackgroundFrame.Width, GUI.Font, 1);
GUI.DrawString(spriteBatch,
new Vector2((int)(BackgroundFrame.Center.X - GUI.Font.MeasureString(uiLabel).X / 2), (int)BackgroundFrame.Y + 5),
uiLabel, Color.White * 0.9f);
}
}
else if (!subInventory)
if (container.InventoryTopSprite != null && !subInventory)
{
container.InventoryTopSprite.Draw(spriteBatch, new Vector2(BackgroundFrame.Center.X, BackgroundFrame.Y), 0.0f, UIScale);
}