1
0
Fork 0

Creative inv.: Reset scroll bar when switching

objects
Wuzzy 2017-06-02 23:14:19 +02:00
parent b53f1432b8
commit 260c83087c
1 changed files with 4 additions and 2 deletions

View File

@ -446,9 +446,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
if fields.creative_prev then
start_i = start_i - 9*5
end
if fields.creative_next then
elseif fields.creative_next then
start_i = start_i + 9*5
else
-- Reset scroll bar if not scrolled
start_i = 0
end
if start_i < 0 then
start_i = start_i + 9*5