Added 320x240 resolution option
This commit is contained in:
parent
6adfc52891
commit
a67cee242b
@ -67,7 +67,7 @@ public class Launcher extends Application {
|
|||||||
// Getting resolution ChoiceBox object from namespace
|
// Getting resolution ChoiceBox object from namespace
|
||||||
ChoiceBox<String> cb = (ChoiceBox<String>) namespace.get("resolution");
|
ChoiceBox<String> cb = (ChoiceBox<String>) namespace.get("resolution");
|
||||||
// Assigning list of possible choices to ChoiceBox
|
// Assigning list of possible choices to ChoiceBox
|
||||||
ObservableList<String> availableres = FXCollections.observableArrayList("640x480", "800x600", "1024x768", "1280x720", "1366x768", "1600x900", "1920x1080");
|
ObservableList<String> availableres = FXCollections.observableArrayList("320x240", "640x480", "800x600", "1024x768", "1280x720", "1366x768", "1600x900", "1920x1080");
|
||||||
cb.setItems(availableres);
|
cb.setItems(availableres);
|
||||||
// Setting default ChoiceBox value to the one already in the config file
|
// Setting default ChoiceBox value to the one already in the config file
|
||||||
if (!availableres.contains(setter.getResolution())) {
|
if (!availableres.contains(setter.getResolution())) {
|
||||||
@ -183,6 +183,10 @@ public class Launcher extends Application {
|
|||||||
int width, height;
|
int width, height;
|
||||||
ChoiceBox<String> cb = (ChoiceBox<String>) namespace.get("resolution");
|
ChoiceBox<String> cb = (ChoiceBox<String>) namespace.get("resolution");
|
||||||
switch (cb.getValue()) {
|
switch (cb.getValue()) {
|
||||||
|
case "320x240":
|
||||||
|
width = 320;
|
||||||
|
height = 240;
|
||||||
|
break;
|
||||||
case "800x600":
|
case "800x600":
|
||||||
width = 800;
|
width = 800;
|
||||||
height = 600;
|
height = 600;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user