From 3dcba740c045177d7a822e5239d43329ee764b2e Mon Sep 17 00:00:00 2001 From: Athozus Date: Tue, 11 Apr 2023 21:14:12 +0200 Subject: [PATCH] Mix colors for unread/cc in inbox with selected green --- ui/inbox.lua | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/ui/inbox.lua b/ui/inbox.lua index 1e49422..4fa148d 100644 --- a/ui/inbox.lua +++ b/ui/inbox.lua @@ -56,18 +56,32 @@ function mail.show_inbox(name, sortfieldindex, sortdirection, filter) end end if selected_id > 0 then - formspec[#formspec + 1] = ",#466432" - elseif not message.read then - if not mail.player_in_list(name, message.to) then - formspec[#formspec + 1] = ",#FFD788" + if not message.read then + if not mail.player_in_list(name, message.to) then + formspec[#formspec + 1] = ",#A39E5D" + else + formspec[#formspec + 1] = ",#A39E19" + end else - formspec[#formspec + 1] = ",#FFD700" + if not mail.player_in_list(name, message.to) then + formspec[#formspec + 1] = ",#899888" + else + formspec[#formspec + 1] = ",#466432" + end end else - if not mail.player_in_list(name, message.to) then - formspec[#formspec + 1] = ",#CCCCDD" + if not message.read then + if not mail.player_in_list(name, message.to) then + formspec[#formspec + 1] = ",#FFD788" + else + formspec[#formspec + 1] = ",#FFD700" + end else - formspec[#formspec + 1] = "," + if not mail.player_in_list(name, message.to) then + formspec[#formspec + 1] = ",#CCCCDD" + else + formspec[#formspec + 1] = "," + end end end formspec[#formspec + 1] = ","