From 8b4a92ef2da4b4ef9bb2be7ce4c532a7a7563795 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sun, 7 Jun 2015 18:48:32 +0100 Subject: [PATCH] word-wrap book text This change word-wraps text when reading a book. --- mods/default/craftitems.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/default/craftitems.lua b/mods/default/craftitems.lua index dd5ae51..facff57 100644 --- a/mods/default/craftitems.lua +++ b/mods/default/craftitems.lua @@ -28,8 +28,9 @@ 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.. - "label[1,0.5;"..minetest.formspec_escape(title).."]".. - "label[0.5,1.5;"..minetest.formspec_escape(text).."]" + "label[0.5,0.5;by "..owner.."]".. + "label[0.5,0;"..minetest.formspec_escape(title).."]".. + "textarea[0.5,1.5;7.5,7;;"..minetest.formspec_escape(text)..";]" end minetest.show_formspec(user:get_player_name(), "default:book", formspec) end