mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-10 00:20:34 -04:00
Store colors and use a lighter selection color
This commit is contained in:
parent
f5198b9187
commit
95475c7c59
12 changed files with 56 additions and 43 deletions
16
ui/inbox.lua
16
ui/inbox.lua
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue