Skip to content

Commit 8b4a92e

Browse files
tenplus1est31
authored andcommittedJun 8, 2015
word-wrap book text
This change word-wraps text when reading a book.
1 parent f92d49f commit 8b4a92e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎mods/default/craftitems.lua

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ local function book_on_use(itemstack, user, pointed_thing)
2828
"button_exit[2.5,7.5;3,1;save;Save]"
2929
else
3030
formspec = "size[8,8]"..default.gui_bg..
31-
"label[1,0.5;"..minetest.formspec_escape(title).."]"..
32-
"label[0.5,1.5;"..minetest.formspec_escape(text).."]"
31+
"label[0.5,0.5;by "..owner.."]"..
32+
"label[0.5,0;"..minetest.formspec_escape(title).."]"..
33+
"textarea[0.5,1.5;7.5,7;;"..minetest.formspec_escape(text)..";]"
3334
end
3435
minetest.show_formspec(user:get_player_name(), "default:book", formspec)
3536
end

0 commit comments

Comments
 (0)
Please sign in to comment.