Corner Clothing UI (#22883)
* Corner clothing (save point) * IT WORKS. YIPPEE * the last of it * template rejigs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user