mirror of
https://github.com/LDDestroier/CC/
synced 2025-06-26 15:12:52 +00:00
Removed unneccesary tsv() calls
This commit is contained in:
parent
633a99665c
commit
c1fc932c6b
11
tron.lua
11
tron.lua
@ -600,9 +600,7 @@ end
|
|||||||
|
|
||||||
--draws grid and background at scroll 'x' and 'y', along with trails and players
|
--draws grid and background at scroll 'x' and 'y', along with trails and players
|
||||||
local drawGrid = function(x, y, onlyDrawGrid, useSetVisible)
|
local drawGrid = function(x, y, onlyDrawGrid, useSetVisible)
|
||||||
if useSetVisible then
|
tsv(false)
|
||||||
tsv(false)
|
|
||||||
end
|
|
||||||
x, y = mathfloor(x + 0.5), mathfloor(y + 0.5)
|
x, y = mathfloor(x + 0.5), mathfloor(y + 0.5)
|
||||||
local bg = {{},{},{}}
|
local bg = {{},{},{}}
|
||||||
local foreX, foreY
|
local foreX, foreY
|
||||||
@ -705,9 +703,7 @@ local drawGrid = function(x, y, onlyDrawGrid, useSetVisible)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if useSetVisible then
|
tsv(true)
|
||||||
tsv(true)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local render = function(useSetVisible, netTime)
|
local render = function(useSetVisible, netTime)
|
||||||
@ -836,7 +832,6 @@ local makeMenu = function(x, y, options, doAnimate, scrollInfo, _cpos)
|
|||||||
rend()
|
rend()
|
||||||
while true do
|
while true do
|
||||||
evt = {os.pullEvent()}
|
evt = {os.pullEvent()}
|
||||||
tsv(false)
|
|
||||||
if evt[1] == "key" then
|
if evt[1] == "key" then
|
||||||
if evt[2] == keys.up then
|
if evt[2] == keys.up then
|
||||||
lastPos = cpos
|
lastPos = cpos
|
||||||
@ -851,13 +846,11 @@ local makeMenu = function(x, y, options, doAnimate, scrollInfo, _cpos)
|
|||||||
lastPos = cpos
|
lastPos = cpos
|
||||||
cpos = #options
|
cpos = #options
|
||||||
elseif evt[2] == keys.enter then
|
elseif evt[2] == keys.enter then
|
||||||
tsv(true)
|
|
||||||
return cpos, {step, gsX, gsY}
|
return cpos, {step, gsX, gsY}
|
||||||
end
|
end
|
||||||
elseif evt[1] == "mouse_click" then
|
elseif evt[1] == "mouse_click" then
|
||||||
if evt[4] >= y and evt[4] < y+#options then
|
if evt[4] >= y and evt[4] < y+#options then
|
||||||
if cpos == evt[4] - (y - 1) then
|
if cpos == evt[4] - (y - 1) then
|
||||||
tsv(true)
|
|
||||||
return cpos, {step, gsX, gsY}
|
return cpos, {step, gsX, gsY}
|
||||||
else
|
else
|
||||||
cpos = evt[4] - (y - 1)
|
cpos = evt[4] - (y - 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user