Skip to content

Commit

Permalink
center grid elements
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasvlevi committed May 11, 2024
1 parent a50f0a5 commit 8b9caf9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/grid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ function draw()
for j=0, height, step do

if (
mouseX > i and
mouseX < i+step and
mouseY > j and
mouseY < j+step
mouseX > i-step/2 and
mouseX < i+step/2 and
mouseY > j-step/2 and
mouseY < j+step/2
) then
fill(255, 155, 50);
else
fill(155, 50, 255)
fill(155, 50, 255);
end

circle(i, j, step);
Expand Down

0 comments on commit 8b9caf9

Please sign in to comment.