#N canvas 748 369 499 533 10;
#X declare -path ofelia/libs/of;
#X obj 306 14 declare -path ofelia/libs/of;
#X obj 25 76 of.setup;
#X obj 25 140 of.draw;
#X obj 25 118 of.setBackgroundColor 55;
#X obj 182 214 nbx 5 14 1 1000 0 1 empty empty gridSizeY 0 -8 0 10
-262144 -1 -1 30 256;
#X obj 261 214 nbx 5 14 0 1000 0 1 empty empty numberX 0 -8 0 10 -262144
-1 -1 10 256;
#X obj 340 214 nbx 5 14 0 1000 0 1 empty empty numberY 0 -8 0 10 -262144
-1 -1 10 256;
#X obj 103 213 nbx 5 14 1 1000 0 1 empty empty gridSizeX 0 -8 0 10
-262144 -1 -1 50 256;
#X obj 25 13 loadbang;
#X obj 25 55 of.Window;
#X obj 25 97 of.setWindowTitle Grid;
#X msg 25 34 setPosition 30 100 \, setSize 800 400 \, create;
#X obj 25 161 of.translate 50 50;
#X obj 25 233 ofelia d -c50 \; function ofelia.list(f) \; local gridSizeX
= f[1] \; local gridSizeY = f[2] \; local mouseX = (of.getMouseX()-50)
// gridSizeX \; local mouseY = (of.getMouseY()-50) // gridSizeY \;
for x = 0 \, f[3] do \; for y = 0 \, f[4] do \; of.fill() \; if x ==
mouseX and y == mouseY then \; of.setColor(0 \, 0 \, 0 \, 255) \; of.drawRectangle(mouseX*gridSizeX
\, mouseY*gridSizeY \, gridSizeX \, gridSizeY) \; else \; of.setColor(x*gridSizeX
\, y*gridSizeY \, 100) \; of.drawRectangle(x*gridSizeX \, y*gridSizeY
\, gridSizeX \, gridSizeY) \; of.noFill() \; of.setColor(0 \, 0 \,
0 \, 255) \; of.drawRectangle(x*gridSizeX \, y*gridSizeY \, gridSizeX
\, gridSizeY) \; end \; end \; end \; end \;;
#X connect 1 0 10 0;
#X connect 2 0 12 0;
#X connect 4 0 13 2;
#X connect 5 0 13 3;
#X connect 6 0 13 4;
#X connect 7 0 13 1;
#X connect 8 0 11 0;
#X connect 10 0 3 0;
#X connect 11 0 9 0;
#X connect 12 0 13 0;
