a little help please:)
in
Programming Questions
•
1 year ago
Hi there.
i want to make a grid that u can drag letters from a pre-existing word to other squares. but also the ability to add new ones if a key is pressed.
Grid so far:
int videoScale = 50;
int columns, rows;
void setup() {
size(550,550);
columns = width/videoScale;
rows = height/videoScale;
}
void draw() {
for (int i = 0; i < columns; i++) {
for (int j = 0; j < rows; j++) {
int x = i*videoScale;
int y = j*videoScale;
stroke(0);
fill(255);
rect(x,y,videoScale,videoScale);
}
}
}
textFont(loadFont("Shruti-48.vlw"));
fill(0);
textAlign(LEFT);
text("B", 15, 40);
fill(0);
textAlign(LEFT);
text("A", 15, 90);
fill(0);
textAlign(LEFT);
text("T", 15, 140);
fill(0);
textAlign(LEFT);
text("M", 15, 190);
fill(0);
textAlign(LEFT);
text("A", 15, 240);
fill(0);
textAlign(LEFT);
text("N", 15, 290);
fill(0);
textAlign(LEFT);
text("I", 15, 340);
fill(0);
textAlign(LEFT);
text("S", 15, 390);
fill(0);
textAlign(LEFT);
text("C", 15, 440);
fill(0);
textAlign(LEFT);
text("O", 15, 490);
fill(0);
textAlign(LEFT);
text("O", 15, 540);
}
1