mirror of https://github.com/LDDestroier/CC/
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
|
end
|
||||||
doRend = true
|
doRend = true
|
||||||
elseif evt[2] == tID then
|
elseif evt[2] == tID then
|
||||||
doRend = true
|
if x > fromX and xmod < x - fromX then
|
||||||
if x > fromX then
|
|
||||||
xmod = math.min(xmod + 1, x - fromX)
|
xmod = math.min(xmod + 1, x - fromX)
|
||||||
|
drawGrid(gsX, gsY, true)
|
||||||
tID = os.startTimer(0.05)
|
tID = os.startTimer(0.05)
|
||||||
else
|
elseif xmod > x - fromX then
|
||||||
xmod = math.max(xmod - 1, x - fromX)
|
xmod = math.max(xmod - 1, x - fromX)
|
||||||
|
drawGrid(gsX, gsY, true)
|
||||||
tID = os.startTimer(0.05)
|
tID = os.startTimer(0.05)
|
||||||
end
|
end
|
||||||
|
doRend = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if lastPos ~= cpos or doRend then
|
if lastPos ~= cpos or doRend then
|
||||||
|
@ -1293,8 +1295,8 @@ local titleScreen = function()
|
||||||
(useSkynet and "Disable" or "Enable") .. " Skynet",
|
(useSkynet and "Disable" or "Enable") .. " Skynet",
|
||||||
"Back..."
|
"Back..."
|
||||||
}
|
}
|
||||||
choice, scrollInfo = makeMenu(6, currentX, scr_y - #options, options, true, scrollInfo, _cpos)
|
choice, scrollInfo = makeMenu(8, currentX, scr_y - #options, options, true, scrollInfo, _cpos)
|
||||||
currentX = 6
|
currentX = 8
|
||||||
_cpos = choice
|
_cpos = choice
|
||||||
if choice == 1 then
|
if choice == 1 then
|
||||||
return "demo"
|
return "demo"
|
||||||
|
|
Loading…
Reference in New Issue