From: JC Date: Mon, 31 Jul 2023 00:41:17 +0000 (-0500) Subject: Allow "selecting" a cell, and draw it as filled in X-Git-Url: https://git.jacobcasper.com/?a=commitdiff_plain;h=3d688932ec05bc2cfb8e57ff123c74b924b4d096;p=life-pd.git Allow "selecting" a cell, and draw it as filled in Selection is hardcoded to 1,1 for now --- 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