From 876b24e1fe96e92b3b6d1c630b116c9d1d36c8a4 Mon Sep 17 00:00:00 2001 From: Vanic Date: Wed, 7 Jan 2026 14:26:01 +0300 Subject: [PATCH] Formspec: add item image button --- mods/CORE/Formspec/src/Formspec.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/mods/CORE/Formspec/src/Formspec.lua b/mods/CORE/Formspec/src/Formspec.lua index 8574601..71ac66c 100644 --- a/mods/CORE/Formspec/src/Formspec.lua +++ b/mods/CORE/Formspec/src/Formspec.lua @@ -393,9 +393,18 @@ function Formspec:imageButton() end ----TODO -function Formspec:itemImageButton() +---@param x number +---@param y number +---@param w number +---@param h number +---@param itemName string +---@param name string +---@param label string? +function Formspec:itemImageButton(x, y, w, h, itemName, name, label) + local element = ('item_image_button[%s,%s;%s,%s;%s;%s;%s]'):format( + x, y, w, h, itemName, name, label or '') + self:addElement(element) end ---TODO