Skip to content

Instantly share code, notes, and snippets.

@moziauddin
Created April 22, 2020 08:35
Show Gist options
  • Save moziauddin/5904d70d1badf922d158e2dd18d427b7 to your computer and use it in GitHub Desktop.
Save moziauddin/5904d70d1badf922d158e2dd18d427b7 to your computer and use it in GitHub Desktop.
Use new line charater in string and set resizable windows in Processing3
void setup() {
size(800,800);
surface.setTitle("Test Title!");
surface.setResizable(true);
}
void draw() {
background(0);
stroke(255);
textSize(60);
textAlign(CENTER, BOTTOM);
text("GAME OVER", width/2, height/2);
textAlign(CENTER, CENTER);
String s = "Score: 1000 \n Name: Ron";
textSize(20);
text(s, width/2,height * 0.8);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment