added new constructors to game config class
This commit is contained in:
@@ -35,4 +35,39 @@ public class GameApplicationConfiguration extends LwjglApplicationConfiguration
|
||||
public GameApplicationConfiguration() {
|
||||
this(1920,1080,false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes a new configuration with the given parameters
|
||||
* @param title the title of the window
|
||||
* @param width the width in pixels
|
||||
* @param height the height in pixels
|
||||
* @param fullscreen if the window should be fullscreen
|
||||
*/
|
||||
public GameApplicationConfiguration(String title, int width, int height, boolean fullscreen) {
|
||||
super();
|
||||
super.width = width;
|
||||
super.height = height;
|
||||
super.title = title;
|
||||
super.fullscreen = fullscreen;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes a new configuration with the given parameters.
|
||||
* fullscreen is off
|
||||
* @param title the window title
|
||||
* @param width the width in pixels
|
||||
* @param height the height in pixels
|
||||
*/
|
||||
public GameApplicationConfiguration(String title, int width, int height) {
|
||||
this(title,width,height,false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes a new configuration with the given title
|
||||
* the window will be 1920 x 1080 and fullscreen will be off
|
||||
* @param title the window title
|
||||
*/
|
||||
public GameApplicationConfiguration(String title) {
|
||||
this(title, 1920,1080);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import temp.Networking;
|
||||
|
||||
public class DesktopLauncher {
|
||||
public static void main (String[] arg) {
|
||||
GameApplicationConfiguration config = new GameApplicationConfiguration(1200,800);
|
||||
GameApplicationConfiguration config = new GameApplicationConfiguration("Netwerk Game",1200,800);
|
||||
new LwjglApplication(new MainGame(), config);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user