Fix broken month buttons

master
Wuzzy 2020-08-28 13:48:56 +02:00
parent c989105bab
commit 4dc8333070
1 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ function calendar.show_calendar(player_name, settings, wanted_months, wanted_yea
-- Add controls
if chg_months then
if wanted_months > 0 or wanted_years > 0 then
if chg_months and wanted_months > 0 then
if chg_months or wanted_months > 0 then
formspec = formspec .. "button[1.5,"..y..";1,1;prev_month;<]"
.. "tooltip[prev_month;"..F(S("Previous month")).."]"
end
@ -160,7 +160,7 @@ function calendar.show_calendar(player_name, settings, wanted_months, wanted_yea
formspec = formspec .. "button[2.5,"..y..";2,1;today;"..F(S("Today")).."]"
end
if chg_months and wanted_months < calendar.MONTHS - 1 then
if chg_months or wanted_months < calendar.MONTHS - 1 then
formspec = formspec .. "button[4.5,"..y..";1,1;next_month;>]"
.. "tooltip[next_month;"..F(S("Next month")).."]"
end