API reference Obsidian.API.Client.Razor
ItemGrid class
Stacks that aren't the menu's slots, like ItemGrid: ItemGrid.Items row by row, ItemGrid.Columns by ItemGrid.Rows from ItemGrid.FirstRow, with their tooltips. Its size is its cells', 18 pixels each.
public sealed class ItemGrid : ScreenPart
In Obsidian.API.Client.
Constructors
public ItemGrid();Properties
public int Columns { get; set; }FirstRow
public int FirstRow { get; set; }The row shown first.
FirstRowChanged
public EventCallback<int> FirstRowChanged { get; set; }Raised with the new first row as the player turns the mouse wheel over the grid, up to the last row of ItemGrid.Items; bind it with @bind-FirstRow. Without it, the wheel does nothing.
Items
public IReadOnlyList<ItemStack> Items { get; set; }The stacks, which the client copies as it draws them.
OnClick
public EventCallback<ItemGridClick> OnClick { get; set; }Raised with the clicked cell's index in ItemGrid.Items (even past its end), the mouse button (0 left, 1 right, 2 middle, like vanilla's) and Shift.
public int Rows { get; set; }