mirror of
https://github.com/LDDestroier/CC/
synced 2024-12-14 12:10:29 +00:00
Update tron
This commit is contained in:
parent
344eee2d7a
commit
bb64f8ebc2
4
tron
4
tron
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user