mirror of
https://github.com/LDDestroier/CC/
synced 2025-01-19 05:32:51 +00:00
Cleaned menu animation
This commit is contained in:
parent
9518e30243
commit
2875337175
12
tron.lua
12
tron.lua
@ -1124,14 +1124,16 @@ local makeMenu = function(x, fromX, y, options, doAnimate, scrollInfo, _cpos)
|
||||
end
|
||||
doRend = true
|
||||
elseif evt[2] == tID then
|
||||
doRend = true
|
||||
if x > fromX then
|
||||
if x > fromX and xmod < x - fromX then
|
||||
xmod = math.min(xmod + 1, x - fromX)
|
||||
drawGrid(gsX, gsY, true)
|
||||
tID = os.startTimer(0.05)
|
||||
else
|
||||
elseif xmod > x - fromX then
|
||||
xmod = math.max(xmod - 1, x - fromX)
|
||||
drawGrid(gsX, gsY, true)
|
||||
tID = os.startTimer(0.05)
|
||||
end
|
||||
doRend = true
|
||||
end
|
||||
end
|
||||
if lastPos ~= cpos or doRend then
|
||||
@ -1293,8 +1295,8 @@ local titleScreen = function()
|
||||
(useSkynet and "Disable" or "Enable") .. " Skynet",
|
||||
"Back..."
|
||||
}
|
||||
choice, scrollInfo = makeMenu(6, currentX, scr_y - #options, options, true, scrollInfo, _cpos)
|
||||
currentX = 6
|
||||
choice, scrollInfo = makeMenu(8, currentX, scr_y - #options, options, true, scrollInfo, _cpos)
|
||||
currentX = 8
|
||||
_cpos = choice
|
||||
if choice == 1 then
|
||||
return "demo"
|
||||
|
Loading…
Reference in New Issue
Block a user