word-wrap book text

This change word-wraps text when reading a book.
This commit is contained in:
tenplus1 2015-06-07 18:48:32 +01:00 committed by est31
parent f92d49feff
commit 8b4a92ef2d

@ -28,8 +28,9 @@ local function book_on_use(itemstack, user, pointed_thing)
"button_exit[2.5,7.5;3,1;save;Save]" "button_exit[2.5,7.5;3,1;save;Save]"
else else
formspec = "size[8,8]"..default.gui_bg.. formspec = "size[8,8]"..default.gui_bg..
"label[1,0.5;"..minetest.formspec_escape(title).."]".. "label[0.5,0.5;by "..owner.."]"..
"label[0.5,1.5;"..minetest.formspec_escape(text).."]" "label[0.5,0;"..minetest.formspec_escape(title).."]"..
"textarea[0.5,1.5;7.5,7;;"..minetest.formspec_escape(text)..";]"
end end
minetest.show_formspec(user:get_player_name(), "default:book", formspec) minetest.show_formspec(user:get_player_name(), "default:book", formspec)
end end