Mark today differently

master
Wuzzy 2020-08-27 23:26:47 +02:00
parent 995192fe67
commit 3c58dcbba2
1 changed files with 4 additions and 4 deletions

View File

@ -86,16 +86,16 @@ function calendar.show_calendar(player_name, settings, wanted_months, wanted_yea
day_str = minetest.colorize(COLOR_HOLIDAY, day_str) day_str = minetest.colorize(COLOR_HOLIDAY, day_str)
box_color = COLOR_DAYBOX_HOLIDAY box_color = COLOR_DAYBOX_HOLIDAY
end end
day_str = F(day_str)
if tdays == total_days then if tdays == total_days then
box_color = COLOR_DAYBOX_TODAY formspec = formspec .. "box["..(x-0.05)..","..(y-0.05)..";1.1,1.1;"..COLOR_DAYBOX_TODAY.."]"
table.insert(tooltip_lines, S("Today")) table.insert(tooltip_lines, S("Today"))
end end
formspec = formspec .. "box["..x..","..y..";1,1;"..box_color.."]" ..
"label["..(x+0.15)..","..(y+0.3)..";"..day_str.."]"
if #tooltip_lines > 0 then if #tooltip_lines > 0 then
formspec = formspec .. "tooltip["..x..","..y..";1,1;"..F(table.concat(tooltip_lines, "\n")).."]" formspec = formspec .. "tooltip["..x..","..y..";1,1;"..F(table.concat(tooltip_lines, "\n")).."]"
end end
day_str = F(day_str)
formspec = formspec .. "box["..x..","..y..";1,1;"..box_color.."]" ..
"label["..(x+0.15)..","..(y+0.3)..";"..day_str.."]"
tdays = tdays + 1 tdays = tdays + 1
end end
y = y + 1.1 y = y + 1.1