Allow "selecting" a cell, and draw it as filled in
authorJC <dev@jacobcasper.com>
Mon, 31 Jul 2023 00:41:17 +0000 (19:41 -0500)
committerJC <dev@jacobcasper.com>
Mon, 31 Jul 2023 00:41:17 +0000 (19:41 -0500)
Selection is hardcoded to 1,1 for now

source/main.lua

index e4c3d58..f96c0b4 100644 (file)
@@ -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