(d9829ac) v0.9.4.0
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Linq;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
@@ -29,13 +30,18 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
var itemContainer = new GUILayoutGroup(new RectTransform(new Vector2(0.45f, 0.5f), paddedFrame.RectTransform, Anchor.TopRight)
|
||||
{ RelativeOffset = new Vector2(0.0f, 0.2f + descriptionBlock.RectTransform.RelativeSize.Y) });
|
||||
{ RelativeOffset = new Vector2(0.0f, 0.2f + descriptionBlock.RectTransform.RelativeSize.Y) })
|
||||
{
|
||||
Stretch = true
|
||||
};
|
||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), itemContainer.RectTransform),
|
||||
TextManager.Get("Items", fallBackTag: "mapentitycategory.equipment"), font: GUI.LargeFont);
|
||||
foreach (string itemName in ItemNames)
|
||||
foreach (string itemName in ItemNames.Distinct())
|
||||
{
|
||||
int count = ItemNames.Count(i => i == itemName);
|
||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), itemContainer.RectTransform),
|
||||
" - " + itemName, font: GUI.SmallFont);
|
||||
" - " + (count == 1 ? itemName : itemName + " x" + count),
|
||||
font: GUI.SmallFont);
|
||||
}
|
||||
|
||||
return backFrame;
|
||||
|
||||
Reference in New Issue
Block a user