mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
30 lines
777 B
C#
30 lines
777 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Layout;
|
|
using MinecraftClient.Inventory;
|
|
|
|
namespace MinecraftClient.Tui
|
|
{
|
|
public class HopperView : ContainerViewBase
|
|
{
|
|
public HopperView(McClient handler, int windowId)
|
|
: base(new ContainerViewModel(handler, windowId, ContainerType.Hopper))
|
|
{
|
|
Initialize();
|
|
}
|
|
|
|
protected override int GetTotalSlotRows()
|
|
{
|
|
return 1 + 3 + 1;
|
|
}
|
|
|
|
protected override Control BuildContainerSpecificArea()
|
|
{
|
|
var grid = BuildSlotGrid(_vm.ContainerSlots, 5);
|
|
return new StackPanel
|
|
{
|
|
HorizontalAlignment = HorizontalAlignment.Center,
|
|
Children = { grid },
|
|
};
|
|
}
|
|
}
|
|
}
|