From cca7e4262c572e7571804dba197162f3b402409d Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Sun, 10 May 2020 21:24:19 +0200 Subject: [PATCH] added custom configuration class --- .../game/GameApplicationConfiguration.java | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 core/src/netwerkprog/game/GameApplicationConfiguration.java diff --git a/core/src/netwerkprog/game/GameApplicationConfiguration.java b/core/src/netwerkprog/game/GameApplicationConfiguration.java new file mode 100644 index 0000000..095adb1 --- /dev/null +++ b/core/src/netwerkprog/game/GameApplicationConfiguration.java @@ -0,0 +1,38 @@ +package netwerkprog.game; + +import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; + +/** + * custom application config class for the game + */ +public class GameApplicationConfiguration extends LwjglApplicationConfiguration { + /** + * makes a new configuration with the given parameters + * @param width the width (in pixels) + * @param height the height (in pixels) + * @param fullscreen whether the app should run in fullscreen + */ + public GameApplicationConfiguration(int width, int height, boolean fullscreen) { + super(); + super.width = width; + super.height = height; + super.fullscreen = fullscreen; + } + + /** + * makes a new configuration with the given parameters. + * No fullscreen + * @param width the width (in pixels) + * @param height the height (in pixels) + */ + public GameApplicationConfiguration(int width, int height) { + this(width,height,false); + } + + /** + * makes a new configuration with standard full hd width and height + */ + public GameApplicationConfiguration() { + this(1920,1080,false); + } +}