Created
May 4, 2012 15:49
-
-
Save tarilabs/2595655 to your computer and use it in GitHub Desktop.
Undecorated, alwaysOnTop, centered PROCESSING.ORG Frame (tested on 1.5.1)
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
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