Skip to content

Instantly share code, notes, and snippets.

@tarilabs
Created May 4, 2012 15:49
Show Gist options
  • Save tarilabs/2595655 to your computer and use it in GitHub Desktop.
Save tarilabs/2595655 to your computer and use it in GitHub Desktop.
Undecorated, alwaysOnTop, centered PROCESSING.ORG Frame (tested on 1.5.1)
boolean drawOnce;
int w = 640;
int h = 480;
void setup() {
drawOnce = true;
frame.removeNotify();
frame.setUndecorated(true);
frame.setAlwaysOnTop(true);
frame.addNotify();
size(640,480);
}
void draw() {
if (drawOnce) {
frame.setLocation((screen.width-w)/2,(screen.height-h)/2);
drawOnce = false;
}
background(125);
fill(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment