From b36711593bf4a84aaee452227220eae8906020e4 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sat, 16 Mar 2024 05:04:58 +0300 Subject: [PATCH] docs update --- doc/en/8.Scripting.md | 6 ++++++ doc/ru/8.Скриптинг.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/doc/en/8.Scripting.md b/doc/en/8.Scripting.md index 80126126..68b1e04b 100644 --- a/doc/en/8.Scripting.md +++ b/doc/en/8.Scripting.md @@ -278,6 +278,12 @@ Open block UI and inventory. Throws an exception if block has no UI layout. Returns block inventory ID (if *"inventory-size"=0* a virtual inventory will be created), and UI layout ID. +```python +hud.show_overlay(layoutid: str, playerinv: bool) +``` + +Show overlay with layout specified. Shows player inventory also if playerinv is **true** + > [!NOTE] > Only one block may be open at same time diff --git a/doc/ru/8.Скриптинг.md b/doc/ru/8.Скриптинг.md index 9f88954f..7d174252 100644 --- a/doc/ru/8.Скриптинг.md +++ b/doc/ru/8.Скриптинг.md @@ -271,6 +271,12 @@ hud.open_block(x: int, y: int, z: int) -> int, str Возвращает id инвентаря блока (при *"inventory-size"=0* создаётся виртуальный инвентарь, который удаляется после закрытия), и id макета UI. +```python +hud.show_overlay(layoutid: str, playerinv: bool) +``` + +Показывает элемент в режиме оверлея. Также показывает инвентарь игрока, если playerinv - **true** + > [!NOTE] > Одновременно может быть открыт только один блок