From c64e0252aab9d10800dd77b302c761cd3e2cf963 Mon Sep 17 00:00:00 2001 From: yugecin Date: Tue, 27 Sep 2016 18:36:35 +0200 Subject: [PATCH] make static accessible width & height --- src/itdelatrisu/opsu/Container.java | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/itdelatrisu/opsu/Container.java b/src/itdelatrisu/opsu/Container.java index 81d845cb..88b567b6 100644 --- a/src/itdelatrisu/opsu/Container.java +++ b/src/itdelatrisu/opsu/Container.java @@ -41,6 +41,8 @@ public class Container extends AppGameContainer { protected SlickException e = null; public static Container instance; + public static int width; + public static int height; /** * Create a new container wrapping a game @@ -51,20 +53,8 @@ public class Container extends AppGameContainer { public Container(Game game) throws SlickException { super(game); instance = this; - } - - /** - * Create a new container wrapping a game - * - * @param game The game to be wrapped - * @param width The width of the display required - * @param height The height of the display required - * @param fullscreen True if we want fullscreen mode - * @throws SlickException Indicates a failure to initialise the display - */ - public Container(Game game, int width, int height, boolean fullscreen) throws SlickException { - super(game, width, height, fullscreen); - instance = this; + width = this.getWidth(); + height = this.getHeight(); } @Override