merge dev into test #30

Merged
j23f0712 merged 45 commits from development into dev/test 2024-12-02 01:29:40 +01:00
29 changed files with 291 additions and 95 deletions
Showing only changes of commit 702f96b8db - Show all commits

View File

@@ -249,8 +249,16 @@ public ExecutorService getExecutor() {
return this.executor;
}
public ServerConnection getNetworkSupport() {
return networkConnection;
public void updateResolution(int width, int height) {
AppSettings settings = getContext().getSettings();
settings.setResolution(width, height);
setSettings(settings);
restart();
enter(state);
}
}

View File

@@ -9,6 +9,13 @@
public class VideoSettingsDialog extends Dialog {
private MenuButton backButton;
private MenuButton hdButton9;
private MenuButton fullHdButton9;
private MenuButton wqhdButton9;
private MenuButton hdButton10;
private MenuButton fullHdButton10;
private MenuButton wqhdButton10;
private final MdgaView view;
private boolean active = false;
@@ -20,6 +27,15 @@ public VideoSettingsDialog(MdgaApp app, Node node, MdgaView view) {
backButton = new MenuButton(app, node, view::leaveVideoSettings, "Zurück");
// MenuButton für verschiedene Auflösungen erstellen
hdButton9 = new MenuButton(app, node, () -> app.updateResolution(1280, 720), "hd 16:9");
fullHdButton9 = new MenuButton(app, node, () -> app.updateResolution(1920, 1080), "full hd 16:9");
wqhdButton9 = new MenuButton(app, node, () -> app.updateResolution(2560, 1440), "wqhd 16:9");
hdButton10 = new MenuButton(app, node, () -> app.updateResolution(1280, 800), "hd 16:10");
fullHdButton10 = new MenuButton(app, node, () -> app.updateResolution(1920, 1200), "full hd 16:10");
wqhdButton10 = new MenuButton(app, node, () -> app.updateResolution(2560, 1600), "wqhd 16:10");
float offset = 2.8f;
backButton.setPos(new Vector2f(0, 1.8f));
@@ -29,6 +45,14 @@ public VideoSettingsDialog(MdgaApp app, Node node, MdgaView view) {
protected void onShow() {
active = true;
hdButton9.show();
fullHdButton9.show();
wqhdButton9.show();
hdButton10.show();
fullHdButton10.show();
wqhdButton10.show();
backButton.show();
}
@@ -36,6 +60,14 @@ protected void onShow() {
protected void onHide() {
active = false;
hdButton9.hide();
fullHdButton9.hide();
wqhdButton9.hide();
hdButton10.hide();
fullHdButton10.hide();
wqhdButton10.hide();
backButton.hide();
}