@@ -10,6 +10,8 @@ public sealed class HandsContainer : ItemSlotUIContainer<HandButton>
|
||||
public int ColumnLimit { get => _grid.Columns; set => _grid.Columns = value; }
|
||||
public int MaxButtonCount { get; set; } = 0;
|
||||
|
||||
public int MaxButtonsPerRow { get; set; }= 6;
|
||||
|
||||
/// <summary>
|
||||
/// Indexer. This is used to reference a HandsContainer from the
|
||||
/// controller.
|
||||
@@ -36,6 +38,7 @@ public sealed class HandsContainer : ItemSlotUIContainer<HandButton>
|
||||
_grid.AddChild(newButton);
|
||||
}
|
||||
|
||||
_grid.Columns = Math.Min(_grid.ChildCount, MaxButtonsPerRow);
|
||||
return base.AddButton(newButton);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user