-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppConfig.java
More file actions
47 lines (37 loc) · 1.09 KB
/
Copy pathAppConfig.java
File metadata and controls
47 lines (37 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package org.opengame.engine.app;
import lombok.Builder;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import org.opengame.engine.Engine;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.net.URISyntaxException;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.Objects;
/**
* Configuration of the application
*/
@RequiredArgsConstructor
@Getter
@Setter
public class AppConfig {
private String appName = "OpenEngineApp";
private String appVersion = "1.0";
private int windowWidth = 800;
private int windowHeight = 600;
private boolean fullScreenMode = false;
// private int fpsLimit = -1;
private int ups = 40;
private String workingDirectory;
public String getWorkingDirectory() {
if (workingDirectory == null) {
return Objects.requireNonNull(Engine.class.getResource(".")).getPath() + "../../../";
}
return workingDirectory;
}
public void setWorkingDirectory(String fullPath) {
workingDirectory = fullPath;
}
}