Fix broken month buttons
parent
c989105bab
commit
4dc8333070
4
gui.lua
4
gui.lua
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue