Release v0.15.13.0

This commit is contained in:
Joonas Rikkonen
2021-11-02 13:19:48 +02:00
parent a52a23f8c2
commit 3a35dbfe6c
77 changed files with 509 additions and 224 deletions
@@ -300,6 +300,8 @@ namespace Barotrauma.Items.Components
{
requiresRecipeText.RectTransform.RepositionChildInHierarchy(itemList.Content.RectTransform.GetChildIndex(firstRequiresRecipe.RectTransform));
}
HideEmptyItemListCategories();
}
private void DrawInputOverLay(SpriteBatch spriteBatch, GUICustomComponent overlayComponent)
@@ -479,6 +481,13 @@ namespace Barotrauma.Items.Components
child.Visible = recipe.DisplayName.ToLower().Contains(filter);
}
HideEmptyItemListCategories();
return true;
}
private void HideEmptyItemListCategories()
{
//go through the elements backwards, and disable the labels ("insufficient skills to fabricate", "recipe required...") if there's no items below them
bool recipeVisible = false;
foreach (GUIComponent child in itemList.Content.Children.Reverse())
@@ -490,14 +499,12 @@ namespace Barotrauma.Items.Components
}
else
{
recipeVisible = child.Visible;
recipeVisible |= child.Visible;
}
}
itemList.UpdateScrollBarSize();
itemList.BarScroll = 0.0f;
return true;
}
public bool ClearFilter()