mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
oh yeah, *that's* why screen isn't static
This commit is contained in:
@@ -269,8 +269,21 @@ public class PApplet extends Applet
|
||||
* Note that this won't update if you change the resolution
|
||||
* of your screen once the the applet is running.
|
||||
* <p>
|
||||
* This variable is not static, because future releases need to be better
|
||||
* at handling multiple displays.
|
||||
* This variable is not static because in the desktop version of Processing,
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use screenW and screenH instead.
|
||||
* @deprecated
|
||||
*/
|
||||
public Dimension screen =
|
||||
Toolkit.getDefaultToolkit().getScreenSize();
|
||||
|
||||
Reference in New Issue
Block a user