This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-05-22 00:27:11 +07:00
parent bdb9eaf748
commit d7cc69b2fe
3 changed files with 7 additions and 10 deletions

View File

@@ -114,10 +114,9 @@ function love.draw()
-- love.graphics.line(0, grid_height * iy, 640, grid_height * iy)
-- end
-- drawText(
-- "Pressed: "..(LastPressedKey or '[NONE]').." | Released: "..(LastReleasedKey or '[NONE]'),
-- 0,0,1000,"left"
-- )
love.graphics.setColor(0, 0, 0, 0.8)
love.graphics.rectangle("fill", 10, 445, 200, 30)
drawText("X: "..(LAST_X_POSITION or "-").."; Y: "..(LAST_Y_POSITION or "-"), 10, 455, 200, "left")
love.graphics.pop()
end
@@ -158,6 +157,7 @@ function love.touchreleased(id,x,y)
if not VCTRL.release(id) then
SCENE:onInputRelease{type = "touch", x = x, y = y, dx = 0, dy = 0, id = id}
end
LAST_X_POSITION, LAST_Y_POSITION = x, y
end
function love.keypressed(key, scancode)
@@ -183,8 +183,6 @@ function love.keypressed(key, scancode)
end
SCENE:onInputPress{input=input_pressed, type="key", key=key, scancode=scancode}
end
LastPressedKey = input_pressed or scancode
end
function love.keyreleased(key, scancode)
@@ -203,8 +201,6 @@ function love.keyreleased(key, scancode)
end
SCENE:onInputRelease{input=input_released, type="key", key=key, scancode=scancode}
end
LastReleasedKey = input_released or scancode
end
function love.joystickpressed(joystick, button)