Add window size parameter (#8281)
* Add window size parameter * Formatting * Java 8
This commit is contained in:
@@ -41,15 +41,28 @@ public class DesktopLauncher extends ClientLauncher{
|
|||||||
maximized = true;
|
maximized = true;
|
||||||
width = 900;
|
width = 900;
|
||||||
height = 700;
|
height = 700;
|
||||||
//enable gl3 with command-line argument (slower performance, apparently)
|
for(int i = 0;i<arg.length;i++){
|
||||||
if(Structs.contains(arg, "-gl3")){
|
if(arg[i].charAt(0) == '-'){
|
||||||
gl30 = true;
|
String name = arg[i].substring(1);
|
||||||
}
|
try{
|
||||||
if(Structs.contains(arg, "-antialias")){
|
switch(name){
|
||||||
samples = 16;
|
case "width":
|
||||||
}
|
width = Integer.parseInt(arg[i + 1]);
|
||||||
if(Structs.contains(arg, "-debug")){
|
case "height":
|
||||||
Log.level = LogLevel.debug;
|
height = Integer.parseInt(arg[i + 1]);
|
||||||
|
case "gl3":
|
||||||
|
gl30 = true;
|
||||||
|
case "antialias":
|
||||||
|
samples = 16;
|
||||||
|
case "debug":
|
||||||
|
Log.level = LogLevel.debug;
|
||||||
|
case "maximized":
|
||||||
|
maximized = Boolean.parseBoolean(arg[i + 1]);
|
||||||
|
}
|
||||||
|
}catch(NumberFormatException number){
|
||||||
|
Log.warn("Invalid parameter number value.");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setWindowIcon(FileType.internal, "icons/icon_64.png");
|
setWindowIcon(FileType.internal, "icons/icon_64.png");
|
||||||
}});
|
}});
|
||||||
|
|||||||
Reference in New Issue
Block a user