From a67cee242be263e370b4da1c990ae94a9dd0ee11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Autin?= Date: Thu, 24 Jun 2021 02:31:55 +0200 Subject: [PATCH] Added 320x240 resolution option --- src/launcher/Launcher.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/launcher/Launcher.java b/src/launcher/Launcher.java index 1ea4779..a7b2dea 100644 --- a/src/launcher/Launcher.java +++ b/src/launcher/Launcher.java @@ -67,7 +67,7 @@ public class Launcher extends Application { // Getting resolution ChoiceBox object from namespace ChoiceBox cb = (ChoiceBox) namespace.get("resolution"); // Assigning list of possible choices to ChoiceBox - ObservableList availableres = FXCollections.observableArrayList("640x480", "800x600", "1024x768", "1280x720", "1366x768", "1600x900", "1920x1080"); + ObservableList availableres = FXCollections.observableArrayList("320x240", "640x480", "800x600", "1024x768", "1280x720", "1366x768", "1600x900", "1920x1080"); cb.setItems(availableres); // Setting default ChoiceBox value to the one already in the config file if (!availableres.contains(setter.getResolution())) { @@ -183,6 +183,10 @@ public class Launcher extends Application { int width, height; ChoiceBox cb = (ChoiceBox) namespace.get("resolution"); switch (cb.getValue()) { + case "320x240": + width = 320; + height = 240; + break; case "800x600": width = 800; height = 600;