Fix input on linux
This commit is contained in:
@@ -171,12 +171,31 @@ function borderDraw(x, y, innerWidth, innerHeight)
|
||||
)
|
||||
end
|
||||
|
||||
x = 0
|
||||
y = 0
|
||||
|
||||
function sceneDispose()
|
||||
end
|
||||
|
||||
function sceneUpdate()
|
||||
if inputIsDown(INPUT_ACTION_RIGHT) then
|
||||
x = x + 1
|
||||
end
|
||||
|
||||
if inputIsDown(INPUT_ACTION_LEFT) then
|
||||
x = x - 1
|
||||
end
|
||||
|
||||
if inputIsDown(INPUT_ACTION_DOWN) then
|
||||
y = y + 1
|
||||
end
|
||||
|
||||
if inputIsDown(INPUT_ACTION_UP) then
|
||||
y = y - 1
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function sceneRender()
|
||||
-- Update camera
|
||||
cameraPushMatrix(camera)
|
||||
@@ -185,7 +204,7 @@ function sceneRender()
|
||||
|
||||
spriteBatchPush(
|
||||
nil,
|
||||
0, 0, 32, 32,
|
||||
x, y, x + 32, y + 32,
|
||||
colorBlue()
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user