Add TV remote code

This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-05-26 11:17:02 +07:00
parent 61c3aff9a1
commit 031590cdd1
7 changed files with 77 additions and 14 deletions

View File

@@ -102,10 +102,10 @@ function love.draw()
-- love.graphics.line(0, grid_height * iy, 640, grid_height * iy)
-- end
-- local x, y = GLOBAL_TRANSFORM:inverseTransformPoint(love.mouse.getPosition())
-- love.graphics.setColor(0, 0, 0, 0.8)
-- love.graphics.rectangle("fill", 5, 450, 115, 25)
-- drawText(string.format("X: %.1d; Y: %.1d", x, y), 10, 455, 110, "left")
local x, y = GLOBAL_TRANSFORM:inverseTransformPoint(love.mouse.getPosition())
love.graphics.setColor(0, 0, 0, 0.8)
love.graphics.rectangle("fill", 5, 450, 115, 25)
drawText(string.format("X: %.1d; Y: %.1d", x, y), 10, 455, 110, "left")
-- love.graphics.setColor(1, 1, 1, 1)
-- love.graphics.setLineWidth(2)
@@ -157,6 +157,7 @@ function love.keypressed(key, scancode)
elseif scancode == "f2" and SCENE.title ~= "Input Config" and SCENE.title ~= "Game" then
SCENE = InputConfigScene()
elseif scancode == "f12" then LLDEBUGGER.requestBreak()
elseif scancode == "f11" then SETTINGS.firstTime = true
-- function keys are reserved
elseif string.match(scancode, "^f[1-9]$") or string.match(scancode, "^f1[0-2]+$") then
return