switching to screenWidth/Height instead of screenW/H as per casey's suggestion

This commit is contained in:
benfry
2010-03-05 13:44:26 +00:00
parent 7c80ed4b1e
commit 88c50dd332
4 changed files with 21 additions and 20 deletions
+5 -7
View File
@@ -273,13 +273,7 @@ public class PApplet extends Applet
* not all instances of PApplet will necessarily be started on a screen of
* the same size.
*/
static public int screenW;
static public int screenH;
static {
Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
screenW = size.width;
screenH = size.height;
}
public int screenWidth, screenHeight;
/**
* Use screenW and screenH instead.
@@ -670,6 +664,10 @@ public class PApplet extends Applet
public void init() {
// println("Calling init()");
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
screenWidth = screen.width;
screenHeight = screen.height;
// send tab keys through to the PApplet
setFocusTraversalKeysEnabled(false);
+1
View File
@@ -1,4 +1,5 @@
0179 core
X screenWidth/Height instead of screenW/H
big ones