Created
November 16, 2017 14:10
-
-
Save hiroto3432/9b5dc0b4c179776fa1882e6f4af740b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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