update doc/*/xml-ui-layouts.md

This commit is contained in:
MihailRis 2026-03-04 00:54:59 +03:00
parent 2c5074172b
commit 7da5f8ed0e
2 changed files with 11 additions and 6 deletions

View file

@ -213,9 +213,6 @@ Element must be in direct sub-element of *inventory*.
## *slots-grid*
- `start-index` - inventory slot index of the first slot. Type: integer
- `rows` - number of grid rows (unnecessary if *cols* and *count* specified). Type: integer
- `cols` - number of grid columns (unnecessary if *rows* and *count* specified). Type: integer
- `count` - total number of slots in grid (unnecessary if *rows* and *cols* specified). Type: integer
- `interval` - visual slots interval. Type: number
- `padding` - grid padding (not slots interval). Type: number. (*deprecated*)
- `sharefunc` - Lua event called on <btn>LMB</btn> + <btn>Shift</btn>. Inventory id and slot index passed as arguments.
@ -223,3 +220,8 @@ Element must be in direct sub-element of *inventory*.
- `onrightclick` - Lua event called on <btn>RMB</btn> click. Inventory id and slot index passed as arguments.
- `taking` - the ability to take an item from a slot.
- `placing` - the ability to put an item in a slot.
Slots configuration (just specify two attributes):
- `rows` - ​​number of rows. Type: integer
- `cols` - number of columns. Type: integer
- `count` - total number of slots. Type: integer

View file

@ -214,10 +214,8 @@
## Сетка слотов - *slots-grid*
Элемент должен находиться внутри `inventory` элемента, без посредников.
- `start-index` - индекс первого слота
- `rows` - число рядов (не указывается, если указано cols).
- `cols` - число столбцов (не указывается, если указано rows).
- `count` - общее число слотов (не указывается, если указаны rows и cols).
- `interval` - интервал между слотами. Тип: число.
- `padding` - отступ вокруг решетки слотов. Тип: число. (*атрибут будет удален*)
- `sharefunc` - lua событие вызываемое при использовании ЛКМ + Shift. Передается id инвентаря и индекс слота
@ -225,3 +223,8 @@
- `onrightclick` - lua событие вызываемое при использовании ПКМ. Передается id инвентаря и индекс слота
- `taking` - возможность взять предмет из слота.
- `placing` - возможность положить предмет в слот.
Конфигурация слотов (достаточно указать два атрибута):
- `rows` - число рядов. Тип: число.
- `cols` - число столбцов. Тип: число.
- `count` - общее число слотов. Тип: число.