Corner Clothing UI (#22883)

* Corner clothing (save point)

* IT WORKS. YIPPEE

* the last of it

* template rejigs
This commit is contained in:
Nemanja
2023-12-23 01:32:23 -05:00
committed by GitHub
parent 33399db6c2
commit 9b18357a88
32 changed files with 240 additions and 146 deletions

View File

@@ -16,6 +16,14 @@ public abstract class ItemSlotUIContainer<T> : GridContainer, IItemslotUIContain
{
protected readonly Dictionary<string, T> Buttons = new();
private int? _maxColumns;
public int? MaxColumns
{
get => _maxColumns;
set => _maxColumns = value;
}
public virtual bool TryAddButton(T newButton, out T button)
{
var tempButton = AddButton(newButton);
@@ -68,7 +76,7 @@ public abstract class ItemSlotUIContainer<T> : GridContainer, IItemslotUIContain
{
if (!Children.Contains(newButton) && newButton.Parent == null && newButton.SlotName != "")
AddChild(newButton);
Columns = ChildCount;
Columns = _maxColumns ?? ChildCount;
return AddButtonToDict(newButton);
}