From 3d688932ec05bc2cfb8e57ff123c74b924b4d096 Mon Sep 17 00:00:00 2001 From: JC Date: Sun, 30 Jul 2023 19:41:17 -0500 Subject: [PATCH] Allow "selecting" a cell, and draw it as filled in Selection is hardcoded to 1,1 for now --- source/main.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/main.lua b/source/main.lua index e4c3d58..f96c0b4 100644 --- a/source/main.lua +++ b/source/main.lua @@ -10,6 +10,9 @@ for i=1, 10 do end end +local x = 1 +local y = 1 + function playdate.update() for i,row in ipairs(rects) do @@ -17,6 +20,7 @@ function playdate.update() gfx.drawRect(r.rect) end end + gfx.fillRect(rects[x][y].rect) if playdate.buttonJustPressed("a") then playdate.display.setInverted(not playdate.display.getInverted()) end -- 2.20.1