Created
June 4, 2018 07:56
-
-
Save equalent/3820b4ad15ddbbe95bf9769c464b9b4f to your computer and use it in GitHub Desktop.
Processing Fullscreen Russian Flag
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
int valup=0; | |
int valright=0; | |
int speed=3; | |
String l(String hx){ | |
String sh = hx; | |
int n = unhex(sh); | |
char[] chars = Character.toChars(n); | |
return new String(chars); | |
} | |
void setup(){ | |
noCursor(); | |
fullScreen(); | |
//size(600, 300); | |
} | |
void draw(){ | |
noStroke(); | |
fill(255, 255, 255); | |
rect(0, 0, width, height/3); | |
fill(0, 0, 255); | |
rect(0, height/3, width, height/3); | |
fill(255, 0, 0); | |
rect(0, 2*(height/3), width, height/3); | |
point(300, 150); | |
/*stroke(50); | |
line(0, 0, 600, 300); | |
line(0, 300, 600, 0); | |
line(300, 0, 300, 600);*/ | |
textSize(32); | |
text(l("0420")+l("041E")+l("0421")+l("0421")+l("0418")+l("042F")+" "+year(), 260+valright, 150-valup); | |
textSize(12); | |
text("FPS "+frameRate, 5, 20); | |
} | |
void keyPressed() { | |
if (keyCode==UP){ | |
valup+=speed; | |
} else if(keyCode==DOWN){ | |
valup-=speed; | |
} else if(keyCode==RIGHT){ | |
valright+=speed; | |
} else if(keyCode==LEFT) { | |
valright-=speed; | |
} else if(keyCode==ESC){ | |
delay(1000); | |
exit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment