mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
31 lines
824 B
C#
31 lines
824 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Layout;
|
|
using Avalonia.Media;
|
|
using MinecraftClient.Inventory;
|
|
|
|
namespace MinecraftClient.Tui
|
|
{
|
|
public class GridContainerView : ContainerViewBase
|
|
{
|
|
private readonly int _gridRows;
|
|
private readonly int _gridCols;
|
|
|
|
public GridContainerView(McClient handler, int windowId, ContainerType type, int rows, int cols)
|
|
: base(new ContainerViewModel(handler, windowId, type))
|
|
{
|
|
_gridRows = rows;
|
|
_gridCols = cols;
|
|
Initialize();
|
|
}
|
|
|
|
protected override int GetTotalSlotRows()
|
|
{
|
|
return _gridRows + 3 + 1;
|
|
}
|
|
|
|
protected override Control BuildContainerSpecificArea()
|
|
{
|
|
return BuildSlotGrid(_vm.ContainerSlots, _gridCols);
|
|
}
|
|
}
|
|
}
|