30 lines
972 B
Lua
30 lines
972 B
Lua
local esc = minetest.formspec_escape
|
|
local title, text = '', ''
|
|
|
|
sign_formspec =
|
|
'size[11,8]'..
|
|
'no_prepend[]'..
|
|
'bgcolor[#080808BB;true]'..
|
|
'background[0,0;11,8;hall_plaque.png]'
|
|
|
|
function hall.edit_sign(title, bottom, left, right)
|
|
local formspec =
|
|
sign_formspec..
|
|
"field[0.5,1;7.5,0;title;"..esc("Title:")..";"..esc(title) .. "]" ..
|
|
"textarea[1,1.5;4.25,3;left;;"..esc(left).."]" ..
|
|
"textarea[6.25,1.5;4.25,3;right;;"..esc(right).."]" ..
|
|
"textarea[1,4;9.5,3;bottom;;"..esc(bottom).."]" ..
|
|
"button_exit[4,6.5;3,1;save;Save]"
|
|
return formspec
|
|
end
|
|
|
|
function hall.view_sign(title, bottom, left, right)
|
|
local formspec =
|
|
sign_formspec..
|
|
'hypertext[0,0;11,1;;<center><style color=black size=40>'..esc(title)..'</style></center>]'..
|
|
"textarea[1,1.5;4.25,3;;;"..esc(left).."]"..
|
|
"textarea[6.25,1.5;4.25,3;;;"..esc(right).."]"..
|
|
"textarea[1,4;9.5,3;;;"..esc(bottom).."]"
|
|
return formspec
|
|
end
|