Mark today differently
parent
995192fe67
commit
3c58dcbba2
8
gui.lua
8
gui.lua
|
@ -86,16 +86,16 @@ function calendar.show_calendar(player_name, settings, wanted_months, wanted_yea
|
|||
day_str = minetest.colorize(COLOR_HOLIDAY, day_str)
|
||||
box_color = COLOR_DAYBOX_HOLIDAY
|
||||
end
|
||||
day_str = F(day_str)
|
||||
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"))
|
||||
end
|
||||
formspec = formspec .. "box["..x..","..y..";1,1;"..box_color.."]" ..
|
||||
"label["..(x+0.15)..","..(y+0.3)..";"..day_str.."]"
|
||||
if #tooltip_lines > 0 then
|
||||
formspec = formspec .. "tooltip["..x..","..y..";1,1;"..F(table.concat(tooltip_lines, "\n")).."]"
|
||||
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
|
||||
end
|
||||
y = y + 1.1
|
||||
|
|
Loading…
Reference in New Issue