From 7da5f8ed0ebd4bc533fd0164715946c50f17e33b Mon Sep 17 00:00:00 2001 From: MihailRis Date: Wed, 4 Mar 2026 00:54:59 +0300 Subject: [PATCH] update doc/*/xml-ui-layouts.md --- doc/en/xml-ui-layouts.md | 8 +++++--- doc/ru/xml-ui-layouts.md | 9 ++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/en/xml-ui-layouts.md b/doc/en/xml-ui-layouts.md index 97b36d1f6..aeb71dd62 100644 --- a/doc/en/xml-ui-layouts.md +++ b/doc/en/xml-ui-layouts.md @@ -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 LMB + Shift. 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 RMB 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 diff --git a/doc/ru/xml-ui-layouts.md b/doc/ru/xml-ui-layouts.md index aeb669b3f..2e93e6f0a 100644 --- a/doc/ru/xml-ui-layouts.md +++ b/doc/ru/xml-ui-layouts.md @@ -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` - общее число слотов. Тип: число.