diff --git a/ui/about.lua b/ui/about.lua index e8c84d0..1ec21ea 100644 --- a/ui/about.lua +++ b/ui/about.lua @@ -63,7 +63,7 @@ function mail.show_about(name) box[0,2.6;3,0.45;]] .. mail.get_color("highlighted") .. [[] label[0.2,2.6;]] .. S("Note") .. [[] - textarea[0.5,3.1;4,5.5;;;]] .. + textarea[0.5,3.15;4,5.5;;;]] .. S("Communication using this system is NOT guaranteed to be private!") .. " " .. S("Admins are able to view the messages of any player.") .. [[] diff --git a/ui/settings.lua b/ui/settings.lua index d3744a9..89f1cb2 100644 --- a/ui/settings.lua +++ b/ui/settings.lua @@ -31,7 +31,7 @@ function mail.show_settings(name) ]] local x = 3.5 - local y = -0.6 + local y = -0.7 -- put settings in order local ordered_settings = {} for setting, data in pairs(mail.settings) do @@ -86,7 +86,7 @@ function mail.show_settings(name) end elseif data.type == "index" then - y = y + 0.55 + y = y + 0.2 local formatted_dataset = table.copy(data.dataset) if data.format then for i, d in ipairs(formatted_dataset) do @@ -107,22 +107,27 @@ function mail.show_settings(name) tooltip[]] .. setting .. ";" .. data.tooltip .. [[] ]] end + y = y + 0.2 elseif data.type == "list" then - y = y + 0.5 + y = y + 0.3 + formspec = formspec .. [[ + tablecolumns[color;text] + table[]] .. x-0.0125 .. "," .. y .. ";3.8125,2.5;" .. setting .. ";" .. + mail.get_color("header") .. "," .. data.label .. ",," .. + table.concat(field_default, ",,") .. "]" + + y = y + 3.1 formspec = formspec .. [[ field[]] .. x+0.275 .. "," .. y .. ";2.975,0.5;field_" .. setting .. [[;;] button[]] .. x+2.75 .. "," .. y-0.325 .. ";0.75,0.5;add_" .. setting .. [[;+] button[]] .. x+3.25 .. "," .. y-0.325 .. ";0.75,0.5;remove_" .. setting .. [[;-] ]] + if data.tooltip then formspec = formspec .. "tooltip[field_" .. setting .. ";" .. data.tooltip .. "]" end - y = y + 0.5 - formspec = formspec .. [[ - tablecolumns[color;text] - table[]] .. x-0.0125 .. "," .. y .. ";3.8125,2.5;" .. setting .. ";" .. - mail.get_color("header") .. "," .. data.label .. ",," .. - table.concat(field_default, ",,") .. "]" + + y = y - 0.4 end end formspec = formspec .. mail.theme