Skip to content

Commit

Permalink
Add background image to book formspec
Browse files Browse the repository at this point in the history
  • Loading branch information
MT-Modder authored and paramat committed Feb 19, 2016
1 parent 5569950 commit 1ab0fc1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mods/default/craftitems.lua
Expand Up @@ -21,13 +21,15 @@ 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:;"..
minetest.formspec_escape(text).."]"..
"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]"..
Expand Down

0 comments on commit 1ab0fc1

Please sign in to comment.