Store colors and use a lighter selection color

This commit is contained in:
Athozus 2023-06-25 19:12:20 +02:00
parent f5198b9187
commit 95475c7c59
No known key found for this signature in database
GPG key ID: B50895022E8484BF
12 changed files with 56 additions and 43 deletions

View file

@ -48,7 +48,7 @@ function mail.show_inbox(name, sortfieldindex, sortdirection, filter)
button[3.5,9.5;2.5,0.5;selectall;]] .. S("(Un)select all") .. [[]
tablecolumns[color;text;text]
table[0,0.7;5.75,7.45;inbox;#999,]] .. S("From") .. "," .. S("Subject")
table[0,0.7;5.75,7.45;inbox;]] .. mail.colors.header .. "," .. S("From") .. "," .. S("Subject")
local formspec = { inbox_formspec }
mail.message_drafts[name] = nil
@ -71,27 +71,27 @@ function mail.show_inbox(name, sortfieldindex, sortdirection, filter)
if selected_id > 0 then
if not message.read and unread_color_enable then
if not mail.player_in_list(name, message.to) and cc_color_enable then
formspec[#formspec + 1] = ",#A39E5D"
formspec[#formspec + 1] = "," .. mail.colors.imp_add_sel
else
formspec[#formspec + 1] = ",#A39E19"
formspec[#formspec + 1] = "," .. mail.colors.imp_sel
end
else
if not mail.player_in_list(name, message.to) and cc_color_enable then
formspec[#formspec + 1] = ",#899888"
formspec[#formspec + 1] = "," .. mail.colors.add_sel
else
formspec[#formspec + 1] = ",#466432"
formspec[#formspec + 1] = "," .. mail.colors.selected
end
end
else
if not message.read and unread_color_enable then
if not mail.player_in_list(name, message.to) and cc_color_enable then
formspec[#formspec + 1] = ",#FFD788"
formspec[#formspec + 1] = "," .. mail.colors.imp_add
else
formspec[#formspec + 1] = ",#FFD700"
formspec[#formspec + 1] = "," .. mail.colors.important
end
else
if not mail.player_in_list(name, message.to) and cc_color_enable then
formspec[#formspec + 1] = ",#CCCCDD"
formspec[#formspec + 1] = "," .. mail.colors.additional
else
formspec[#formspec + 1] = ","
end