Skip to content
Permalink
Browse files

word-wrap book text

This change word-wraps text when reading a book.
  • Loading branch information
tenplus1 authored and est31 committed Jun 7, 2015
1 parent f92d49f commit 8b4a92ef2da4b4ef9bb2be7ce4c532a7a7563795
Showing with 3 additions and 2 deletions.
  1. +3 −2 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

0 comments on commit 8b4a92e

Please sign in to comment.
You can’t perform that action at this time.