Add background image to book formspec
authorMT-Modder <MT-Modder@users.noreply.github.com>
Sat, 13 Feb 2016 22:19:38 +0000 (17:19 -0500)
committerparamat <mat.gregory@virginmedia.com>
Fri, 19 Feb 2016 19:54:45 +0000 (19:54 +0000)
mods/default/craftitems.lua

index 406943e20440f9f7e48743407933e77c701bd1c4..bb8c445cd77c29d9491a2fbb744f777b8f94cfba 100644 (file)
@@ -21,6 +21,7 @@ local function book_on_use(itemstack, user, pointed_thing)
        local formspec
        if owner == player_name then
                formspec = "size[8,8]"..default.gui_bg..
+                       default.gui_bg_img..
                        "field[0.5,1;7.5,0;title;Title:;"..
                                minetest.formspec_escape(title).."]"..
                        "textarea[0.5,1.5;7.5,7;text;Contents:;"..
@@ -28,6 +29,7 @@ local function book_on_use(itemstack, user, pointed_thing)
                        "button_exit[2.5,7.5;3,1;save;Save]"
        else
                formspec = "size[8,8]"..default.gui_bg..
+                       default.gui_bg_img..
                        "label[0.5,0.5;by "..owner.."]"..
                        "label[0.5,0;"..minetest.formspec_escape(title).."]"..
                        "tableoptions[background=#00000000;highlight=#00000000;border=false]"..