Skip to content

Commit

Permalink
word-wrap book text
Browse files Browse the repository at this point in the history
This change word-wraps text when reading a book.
  • Loading branch information
tenplus1 authored and est31 committed Jun 8, 2015
1 parent f92d49f commit 8b4a92e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mods/default/craftitems.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b4a92e

Please sign in to comment.