mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-25 04:13:44 +01:00
Creative inv.: Reset scroll bar when switching
This commit is contained in:
parent
b53f1432b8
commit
260c83087c
@ -446,9 +446,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
|
|
||||||
if fields.creative_prev then
|
if fields.creative_prev then
|
||||||
start_i = start_i - 9*5
|
start_i = start_i - 9*5
|
||||||
end
|
elseif fields.creative_next then
|
||||||
if fields.creative_next then
|
|
||||||
start_i = start_i + 9*5
|
start_i = start_i + 9*5
|
||||||
|
else
|
||||||
|
-- Reset scroll bar if not scrolled
|
||||||
|
start_i = 0
|
||||||
end
|
end
|
||||||
if start_i < 0 then
|
if start_i < 0 then
|
||||||
start_i = start_i + 9*5
|
start_i = start_i + 9*5
|
||||||
|
Loading…
Reference in New Issue
Block a user