workarounded textarea with hardcoded background because of not text color setting possible
This commit is contained in:
parent
9f1865ccaf
commit
52f54ba545
@ -108,7 +108,8 @@ laptop.register_app("mail", {
|
||||
end
|
||||
|
||||
formspec = formspec .. mtos.theme:get_label('8,1', "Subject: "..(account.selectedmessage.subject or ""))..
|
||||
"]textarea[8.25,1.5;7,8.35;body;;"..(minetest.formspec_escape(account.selectedmessage.body) or "").."]"
|
||||
"background[8,1.55;6.92,7.3;gui_formbg.png]"..
|
||||
"textarea[8.25,1.5;7,8.35;body;;"..(minetest.formspec_escape(account.selectedmessage.body) or "").."]"
|
||||
end
|
||||
return formspec
|
||||
end,
|
||||
@ -210,10 +211,14 @@ laptop.register_view("mail:compose", {
|
||||
account.newmessage = account.newmessage or {}
|
||||
local message = account.newmessage
|
||||
|
||||
local formspec = "field[0.25,1;4,1;receiver;To:;%s]field[0.25,2;4,1;subject;Subject:;%s]textarea[0.25,3;8,4;body;;%s]button[5,8;2,1;send;Send]"
|
||||
local formspec = "background[-0.1,0.4;4.2,2.4;gui_formbg.png]"..
|
||||
"field[0.25,1;4,1;receiver;To:;%s]field[0.25,2;4,1;subject;Subject:;%s]"..
|
||||
"background[0,3.05;7.95,3.44;gui_formbg.png]"..
|
||||
"textarea[0.25,3;8,4;body;;%s]"..
|
||||
mtos.theme:get_button("0,8;2,1", "major", "send", "Send message")
|
||||
formspec = string.format(formspec,minetest.formspec_escape(message.receiver or ""),minetest.formspec_escape(message.subject or ""),minetest.formspec_escape(message.body or ""))
|
||||
if message.receiver and not cloud[message.receiver] then
|
||||
formspec = formspec..mtos.theme:get_label('7,8', "invalid receiver player")
|
||||
formspec = formspec..mtos.theme:get_label('2.3,8', "invalid receiver player")
|
||||
end
|
||||
return formspec
|
||||
end,
|
||||
|
@ -6,7 +6,8 @@ laptop.register_app("stickynote", {
|
||||
local data = app:get_storage_ref()
|
||||
data.text = data.text or ""
|
||||
|
||||
return "textarea[0.35,0.35;15.08,10.5;text;;"..minetest.formspec_escape(data.text).."]"
|
||||
return "background[0,0.35;15.2,9.2;gui_formbg.png]"..
|
||||
"textarea[0.35,0.35;15.08,10.5;text;;"..minetest.formspec_escape(data.text).."]"
|
||||
end,
|
||||
receive_fields_func = function(app, os, fields, sender)
|
||||
if fields.text then
|
||||
|
Loading…
x
Reference in New Issue
Block a user