From ceeee48689c691eb91fb39b6c02720ae89482686 Mon Sep 17 00:00:00 2001 From: RealBadAngel Date: Sat, 1 Dec 2012 17:54:30 +0100 Subject: [PATCH] New elements in formspec, item_image and item_image_button. Fixed also game bug drawing dragged item behind fields, buttons etc. --- doc/lua_api.txt | 13 ++++-- src/guiFormSpecMenu.cpp | 90 ++++++++++++++++++++++++++++++++++++++--- src/guiFormSpecMenu.h | 4 ++ 3 files changed, 99 insertions(+), 8 deletions(-) diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 08619b72a..afdadc640 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -457,9 +457,6 @@ Special groups - fall_damage_add_percent: damage speed = speed * (1 + value/100) - bouncy: value is bounce speed in percent - falling_node: if there is no walkable block under the node it will fall -- attached_node: if the node under it is not a walkable block the node will be - dropped as an item. If the node is wallmounted the - wallmounted direction is checked. Known damage and digging time defining groups ---------------------------------------------- @@ -697,6 +694,10 @@ image[,;,;] ^ Show an image ^ Position and size units are inventory slots +item_image[,;,;] +^ Show an inventory image of registered item/node +^ Position and size units are inventory slots + background[,;,;] ^ Use a background. Inventory rectangles are not drawn then. ^ Position and size units are inventory slots @@ -738,6 +739,12 @@ image_button[,;,;;;