Build 0.20.10.1

This commit is contained in:
Markus Isberg
2022-12-07 06:29:38 +02:00
parent 9d2f160314
commit f5cd0dbd1c
8 changed files with 14 additions and 6 deletions
@@ -476,6 +476,7 @@ namespace Barotrauma
};
List<MapEntityCategory> itemCategories = Enum.GetValues(typeof(MapEntityCategory)).Cast<MapEntityCategory>().ToList();
itemCategories.Remove(MapEntityCategory.None);
//don't show categories with no buyable items
itemCategories.RemoveAll(c => !ItemPrefab.Prefabs.Any(ep => ep.Category.HasFlag(c) && ep.CanBeBought));
itemCategoryButtons.Clear();
@@ -508,6 +509,7 @@ namespace Barotrauma
{
btn.RectTransform.SizeChanged += () =>
{
if (btn.Frame.sprites == null) { return; }
var sprite = btn.Frame.sprites[GUIComponent.ComponentState.None].First();
btn.RectTransform.NonScaledSize = new Point(btn.Rect.Width, (int)(btn.Rect.Width * ((float)sprite.Sprite.SourceRect.Height / sprite.Sprite.SourceRect.Width)));
};