1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-12-14 12:10:29 +00:00

Update tron

This commit is contained in:
LDDestroier 2018-11-14 16:42:14 -05:00 committed by GitHub
parent 344eee2d7a
commit bb64f8ebc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
tron
View File

@ -482,9 +482,9 @@ local makeMenu = function(x, y, options)
evt = {os.pullEvent()}
if evt[1] == "key" then
if evt[2] == keys.up then
cpos = math.max(cpos - 1, 1)
cpos = (cpos - 1) % #options
elseif evt[2] == keys.down then
cpos = math.min(cpos + 1, #options)
cpos = (cpos % #options) + 1
elseif evt[2] == keys.enter then
return cpos
end