summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-08-30 14:53:07 +0200
committerrubenwardy <rubenwardy@gmail.com>2016-09-01 16:22:37 +0100
commited09abd868ee64d90d1a294e62235f8986dc4e7b (patch)
tree7156d1cf73cb99fd9f9cfd72067d784a3cda782b
parent13eb5dcdaefebbbef3b73fe5350752ed89e19a3f (diff)
Automatic line breaks for long award desc.
-rw-r--r--api.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/api.lua b/api.lua
index 1d47014..19f055f 100644
--- a/api.lua
+++ b/api.lua
@@ -335,7 +335,7 @@ function awards.getFormspec(name, to, sid)
formspec = formspec .. "label[1,2.75;"..minetest.formspec_escape(S("(Secret Award)")).."]"..
"image[1,0;3,3;awards_unknown.png]"
if def and def.description then
- formspec = formspec .. "label[0,3.25;"..minetest.formspec_escape(S("Unlock this award to find out what it is.")).."]"
+ formspec = formspec .. "textarea[0.25,3.25;4.8,1.7;;"..minetest.formspec_escape(S("Unlock this award to find out what it is."))..";]"
end
else
local title = item.name
@@ -367,11 +367,11 @@ function awards.getFormspec(name, to, sid)
formspec = formspec .. "background[0,4.80;" .. barwidth ..",0.25;awards_progress_gray.png;false]"
formspec = formspec .. "background[0,4.80;" .. (barwidth * perc) ..",0.25;awards_progress_green.png;false]"
if label then
- formspec = formspec .. "label[1.75,4.63;" .. label .. "]"
+ formspec = formspec .. "label[1.75,4.63;" .. minetest.formspec_escape(label) .. "]"
end
end
if def and def.description then
- formspec = formspec .. "label[0,3.25;"..def.description.."]"
+ formspec = formspec .. "textarea[0.25,3.25;4.8,1.7;;"..minetest.formspec_escape(def.description)..";]"
end
end
end