Skip to content

API reference Obsidian.API.Client.Screens

SlotGrid class

A grid of the open menu's slots, 18 pixels apart, which the player clicks, drags and shift-clicks like any container's: the client draws their stacks and tooltips and sends the clicks to the server. Only a ModMenuScreen shows it.

public sealed class SlotGrid : Widget

In Obsidian.API.Client.

Remarks

The grid's position is where its first slot's item goes (vanilla's slot frames are 18 pixels, one around each 16-pixel item), like MenuScreenProperties.Slots. It's as big as its slots; its Widget.Width and Widget.Height aren't used.

Constructors

public SlotGrid();

Properties

Columns

public int Columns { get; set; }

How many slots each row has.

FirstSlot

public int FirstSlot { get; set; }

The menu's slot in the grid's top left: the menu's own slots count from 0, then the player's inventory follows (see IScreenMenu.SlotCount).

Rows

public int Rows { get; set; }

How many rows there are; the slots are numbered row by row.

On this page