Make legacy mode a bit prettier

master
Wuzzy 2020-08-28 15:23:09 +02:00
parent 153cd2cb3a
commit 5cdfac7e3a
3 changed files with 6 additions and 7 deletions

View File

@ -15,9 +15,9 @@ The calendar starts at Day 1, Month 1 (January), Year 1.
This mod is designed for Minetest 5.3.0, but there's a compability
mode for version 0.4.17.
Due to a limited feature set, the calender form doesn't look as nicely
as in 0.4.17, however. Fake buttons are used for the day boxes to allow
the use of tooltips.
Due to a limited feature set, the calender form looks a bit differently
in 0.4.17. Fake buttons are used for the day boxes to allow the use of
tooltips.
## Customizing the calendar
If you want to customize the calendar (e.g. change the length of months),

View File

@ -121,9 +121,6 @@ function calendar.show_calendar(player_name, settings, wanted_months, wanted_yea
end
day_str = minetest.colorize(COLOR_HOLIDAY, day_str)
box_color = COLOR_DAYBOX_HOLIDAY
if not SHOW_AREA_TOOLTIPS then
formspec = formspec .. "box["..(x-0.05)..","..(y-0.05)..";0.925,1;"..box_color.."]"
end
end
day_str = F(day_str)
-- Highlight today
@ -143,7 +140,9 @@ function calendar.show_calendar(player_name, settings, wanted_months, wanted_yea
if is_holiday then
day_num = minetest.colorize(COLOR_HOLIDAY, pday)
end
formspec = formspec .. "button["..x..","..y..";1,1;day"..iday..";"..F(day_num).."]"
formspec = formspec .. "image_button["..x..","..y..";1,1;"..
F("calendar_legacy_daybox.png^[colorize:"..box_color..":255]")..
";day"..iday..";"..F(day_num).."]"
end
if #tooltip_lines > 0 then
local tooltips = F(table.concat(tooltip_lines, "\n"))

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B