mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
TEST
This commit is contained in:
12
main.lua
12
main.lua
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user