From f9087d14a3655af0a8f47db819b1f9b5dcb9bd7f Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 18 Oct 2012 12:06:47 -0700 Subject: [PATCH 01/24] Allow transparent image_buttons --- src/guiFormSpecMenu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index ed44e441b..9bdcdd5fb 100644 --- a/src/guiFormSpecMenu.cpp +++ b/src/guiFormSpecMenu.cpp @@ -458,6 +458,7 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize) video::ITexture *texture = m_gamedef->tsrc()->getTextureRaw(fimage); gui::IGUIButton *e = Environment->addButton(rect, this, spec.fid, spec.flabel.c_str()); + e->setUseAlphaChannel(true); e->setImage(texture); e->setPressedImage(texture); e->setScaleImage(true); From 8e5167d72622dec428477a7fff529b7dbc974106 Mon Sep 17 00:00:00 2001 From: RealBadAngel Date: Thu, 8 Nov 2012 19:22:37 +0100 Subject: [PATCH 02/24] Adding background to Formspec --- doc/lua_api.txt | 5 +++++ src/guiFormSpecMenu.cpp | 45 +++++++++++++++++++++++++++++++++++++++-- src/guiFormSpecMenu.h | 1 + 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 301832618..500b514d9 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -694,6 +694,11 @@ image[,;,;] ^ Show an image ^ Position and size units are inventory slots +background[,;,;] +^ Use a background. Inventory rectangles are not drawn then. +^ Position and size units are inventory slots +^ Example for formspec 8x4 in 16x resolution: image shall be sized 8*16px x 4*16px + field[,;,;;