(d9829ac) v0.9.4.0

This commit is contained in:
Regalis
2019-10-24 18:05:42 +02:00
parent 9aa12bcac2
commit b39922a074
319 changed files with 12516 additions and 6815 deletions
@@ -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;