Skip to content

Instantly share code, notes, and snippets.

@hiroto3432
Created November 16, 2017 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiroto3432/9b5dc0b4c179776fa1882e6f4af740b0 to your computer and use it in GitHub Desktop.
Save hiroto3432/9b5dc0b4c179776fa1882e6f4af740b0 to your computer and use it in GitHub Desktop.
import processing.core.PApplet;
import processing.core.PFont;
public class GUIbyP5 extends PApplet {
public void settings(){
size(600,500);
}
public void setup(){
textAlign(CENTER,CENTER);
PFont font = createFont("MS-Mincho.vlw",20);
textFont(font);
}
public void draw(){
background(255);
noFill();
strokeWeight(3);
for(int y=0; y<4; y++){
for(int x=0; x<5; x++){
rect(50 + x * 100,50 + y * 100,100,100);
}
}
fill(0);
for(int n=0; n<Jsontest.sub.size(); n++){
String name = Jsontest.sub.get(n).name;
int x = Jsontest.sub.get(n).day - 1;
int y = Jsontest.sub.get(n).period - 1;
text(name , 50 + x * 100,50 + y * 100 , 100,100);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment