(e42047dc1) Tester's build, January 30th 2020
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user