Check number of pages when next/prev clicked
This commit is contained in:
parent
159fc89155
commit
1e49c065f2
4
init.lua
4
init.lua
|
@ -650,6 +650,10 @@ local function on_receive_fields(player, fields)
|
|||
show_fs(player, player_name)
|
||||
|
||||
elseif fields.prev or fields.next then
|
||||
if data.pagemax == 1 then
|
||||
return
|
||||
end
|
||||
|
||||
data.pagenum = data.pagenum - (fields.prev and 1 or -1)
|
||||
if data.pagenum > data.pagemax then
|
||||
data.pagenum = 1
|
||||
|
|
Loading…
Reference in New Issue