From: tenplus1 Date: Sun, 7 Jun 2015 17:48:32 +0000 (+0100) Subject: word-wrap book text X-Git-Tag: 0.4.13~52 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8b4a92ef2da4b4ef9bb2be7ce4c532a7a7563795;p=oweals%2Fminetest_game.git word-wrap book text This change word-wraps text when reading a book. --- diff --git a/mods/default/craftitems.lua b/mods/default/craftitems.lua index dd5ae51f..facff57e 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