/** Adds the canvas to the content pane. This triggers addNotify and starts the canvas' game loop. */ protected void addCanvas () { getContentPane().add(lwjglCanvas.getCanvas()); }
/** Adds the canvas to the content pane. This triggers addNotify and starts the canvas' game loop. */ protected void addCanvas () { getContentPane().add(lwjglCanvas.getCanvas()); }
protected void setDisplayMode (int width, int height) { Dimension size = new Dimension(Math.round(width / scaleX), Math.round(height / scaleY)); LwjglFrame.this.getContentPane().setPreferredSize(size); LwjglFrame.this.getContentPane().invalidate(); LwjglFrame.this.pack(); LwjglFrame.this.setLocationRelativeTo(null); updateSize(width, height); }
protected void setDisplayMode (int width, int height) { Dimension size = new Dimension(Math.round(width / scaleX), Math.round(height / scaleY)); LwjglFrame.this.getContentPane().setPreferredSize(size); LwjglFrame.this.getContentPane().invalidate(); LwjglFrame.this.pack(); LwjglFrame.this.setLocationRelativeTo(null); updateSize(width, height); }
float scaleX = (float)transform.getScaleX(), scaleY = (float)transform.getScaleY(); Dimension size = new Dimension(Math.round(config.width / scaleX), Math.round(config.height / scaleY)); getContentPane().setPreferredSize(size);
float scaleX = (float)transform.getScaleX(), scaleY = (float)transform.getScaleY(); Dimension size = new Dimension(Math.round(config.width / scaleX), Math.round(config.height / scaleY)); getContentPane().setPreferredSize(size);
/** Adds the canvas to the content pane. This triggers addNotify and starts the canvas' game loop. */ protected void addCanvas () { getContentPane().add(lwjglCanvas.getCanvas()); }
protected void setDisplayMode (int width, int height) { Dimension size = new Dimension(Math.round(width / scaleX), Math.round(height / scaleY)); LwjglFrame.this.getContentPane().setPreferredSize(size); LwjglFrame.this.getContentPane().invalidate(); LwjglFrame.this.pack(); LwjglFrame.this.setLocationRelativeTo(null); updateSize(width, height); }
float scaleX = (float)transform.getScaleX(), scaleY = (float)transform.getScaleY(); Dimension size = new Dimension(Math.round(config.width / scaleX), Math.round(config.height / scaleY)); getContentPane().setPreferredSize(size);