From 4e4d32dc97395415706661941fdc6e1da58d18fe Mon Sep 17 00:00:00 2001 From: Jannik Date: Sat, 28 Apr 2018 12:24:40 +0200 Subject: [PATCH 01/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c24aac..1a3f92a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ cemu_UI is a simple, material design graphical frontend for [cemu](http://cemu.i ## Installation Simply download the cemu_UI.jar from [releases](https://github.com/Seil0/cemu_UI/releases), make sure you have the latest version of java 8 oracle jre/jdk installed and open the file. cemu_UI creats a new directory "C:\Users\USERNAME\Documents\cemu_UI", where the database, settings and covers are stored. **first start can take while!** -If you want to use the cloud sync function read the [wiki](https://github.com/Seil0/cemu_UI/wiki#cloud-savegame-syncronisation) carefully! If you have problems using the cloud synchronisation please update to version [075](https://github.com/Seil0/cemu_UI/releases/tag/075). +If you want to use the cloud sync function read the [wiki](https://github.com/Seil0/cemu_UI/wiki#cloud-savegame-syncronisation) carefully! ### [FAQ](https://github.com/Seil0/cemu_UI/wiki#faq) From ea34f10c096fb72fd39a23caaee7798d6393975e Mon Sep 17 00:00:00 2001 From: Jannik Date: Sat, 28 Apr 2018 12:53:01 +0200 Subject: [PATCH 02/15] fixed Hamburger icon has wrong color after color change --- .../java/com/cemu_UI/application/MainWindowController.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/cemu_UI/application/MainWindowController.java b/src/main/java/com/cemu_UI/application/MainWindowController.java index 3a90c41..7d00604 100644 --- a/src/main/java/com/cemu_UI/application/MainWindowController.java +++ b/src/main/java/com/cemu_UI/application/MainWindowController.java @@ -1590,7 +1590,8 @@ public class MainWindowController { addBtn.setGraphic(add_circle_white); reloadRomsBtn.setGraphic(cached_white); smmdbBtn.setGraphic(smmdb_white); - + + menuHam.getStyleClass().clear(); menuHam.getStyleClass().add("jfx-hamburgerW"); } else { dialogBtnStyle = btnStyleBlack; @@ -1612,7 +1613,8 @@ public class MainWindowController { addBtn.setGraphic(add_circle_black); reloadRomsBtn.setGraphic(cached_black); smmdbBtn.setGraphic(smmdb_black); - + + menuHam.getStyleClass().clear(); menuHam.getStyleClass().add("jfx-hamburgerB"); } From e13c84382fc236d1d9f95e26ce5592400afb5e1e Mon Sep 17 00:00:00 2001 From: Jannik Date: Wed, 30 May 2018 19:41:49 +0200 Subject: [PATCH 03/15] biuld against java 10 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 78fa8d1..2b01596 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ language: java jdk: - oraclejdk9 + - oraclejdk10 From c6a40f89373632e7f5eb75c08109472b442f4d77 Mon Sep 17 00:00:00 2001 From: Jannik Date: Wed, 6 Jun 2018 17:54:22 +0200 Subject: [PATCH 04/15] updated some libs * jfoenix 9.0.3 -> 9.0.4 * sqlite-jdbc 3.21.0.1 -> 3.23.1 * google-api-services-drive v3-rev99-1.23.0 -> v3-rev120-1.23.0 * jackson-core 2.9.4 -> 2.9.5 * maven-shade-plugin 3.1.0 -> 3.1.1 --- pom.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 95157e7..4f3d5c8 100644 --- a/pom.xml +++ b/pom.xml @@ -19,14 +19,14 @@ junit junit - 4.11 + 4.12 test com.jfoenix jfoenix - 9.0.3 + 9.0.4 @@ -38,7 +38,7 @@ org.xerial sqlite-jdbc - 3.21.0.1 + 3.23.1 @@ -107,7 +107,7 @@ com.google.apis google-api-services-drive - v3-rev99-1.23.0 + v3-rev120-1.23.0 @@ -150,7 +150,7 @@ com.fasterxml.jackson.core jackson-core - 2.9.4 + 2.9.5 @@ -195,7 +195,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.1.0 + 3.1.1 package From cc4e73c45d1afb12b8769be62c5673e793dacc0b Mon Sep 17 00:00:00 2001 From: Jannik Date: Tue, 12 Jun 2018 16:01:21 +0200 Subject: [PATCH 05/15] InfoAlert & ProcessBuilder * we use an Alert now to display Info Messages * use ProcessBuilder instead of Runtime.exec() --- .../application/MainWindowController.java | 29 ++--- .../cemu_UI/controller/UpdateController.java | 2 +- .../cemu_UI/uiElements/JFXEditGameDialog.java | 4 +- .../{JFXInfoDialog.java => JFXInfoAlert.java} | 110 +++++++++++------- 4 files changed, 86 insertions(+), 59 deletions(-) rename src/main/java/com/cemu_UI/uiElements/{JFXInfoDialog.java => JFXInfoAlert.java} (51%) diff --git a/src/main/java/com/cemu_UI/application/MainWindowController.java b/src/main/java/com/cemu_UI/application/MainWindowController.java index 7d00604..a675138 100644 --- a/src/main/java/com/cemu_UI/application/MainWindowController.java +++ b/src/main/java/com/cemu_UI/application/MainWindowController.java @@ -60,7 +60,7 @@ import com.cemu_UI.datatypes.CourseTableDataType; import com.cemu_UI.datatypes.SmmdbApiDataType; import com.cemu_UI.datatypes.UIROMDataType; import com.cemu_UI.uiElements.JFXEditGameDialog; -import com.cemu_UI.uiElements.JFXInfoDialog; +import com.cemu_UI.uiElements.JFXInfoAlert; import com.cemu_UI.uiElements.JFXOkayCancelDialog; import com.cemu_UI.uiElements.JFXTextAreaInfoDialog; import com.jfoenix.controls.JFXButton; @@ -810,8 +810,8 @@ public class MainWindowController { saveSettings(); } else { String bodyText = newValue + ": No such file or directory"; - JFXInfoDialog fileErrorDialog = new JFXInfoDialog("Waring!", bodyText, dialogBtnStyle, 190, 150, main.getPane()); - fileErrorDialog.show(); + JFXInfoAlert fileErrorDialog = new JFXInfoAlert("Waring!", bodyText, dialogBtnStyle, main.getPrimaryStage()); + fileErrorDialog.showAndWait(); LOGGER.warn(newValue + ": No such file or directory"); } } @@ -826,8 +826,8 @@ public class MainWindowController { reloadRoms(); } else { String bodyText = newValue + ": No such file or directory"; - JFXInfoDialog fileErrorDialog = new JFXInfoDialog("Waring!", bodyText, dialogBtnStyle, 190, 150, main.getPane()); - fileErrorDialog.show(); + JFXInfoAlert fileErrorDialog = new JFXInfoAlert("Waring!", bodyText, dialogBtnStyle, main.getPrimaryStage()); + fileErrorDialog.showAndWait(); LOGGER.warn(newValue + ": No such file or directory"); } } @@ -842,11 +842,12 @@ public class MainWindowController { } @FXML - void aboutBtnAction() { + private void aboutBtnAction() { String bodyText = "cemu_UI by @Seil0 \nVersion: " + version + " (" + buildNumber + ") \"" + versionName + "\" \n" + aboutBtnBodyText; - JFXInfoDialog aboutDialog = new JFXInfoDialog(aboutBtnHeadingText, bodyText, dialogBtnStyle, 350, 200, main.getPane()); - aboutDialog.show(); + + JFXInfoAlert infoAlert = new JFXInfoAlert(aboutBtnHeadingText, bodyText, dialogBtnStyle, main.getPrimaryStage()); + infoAlert.showAndWait(); } @FXML @@ -1069,9 +1070,9 @@ public class MainWindowController { cloudSyncToggleBtn.setSelected(false); // cloud sync init error dialog - JFXInfoDialog cloudSyncErrorDialog = new JFXInfoDialog(cloudSyncErrorHeadingText, - cloudSyncErrorBodyText, dialogBtnStyle, 450, 170, main.getPane()); - cloudSyncErrorDialog.show(); + JFXInfoAlert cloudSyncErrorDialog = new JFXInfoAlert(cloudSyncErrorHeadingText, + cloudSyncErrorBodyText, dialogBtnStyle, main.getPrimaryStage()); + cloudSyncErrorDialog.showAndWait(); } } @@ -1123,9 +1124,9 @@ public class MainWindowController { LOGGER.info("No parameter set!"); //addGame error dialog - JFXInfoDialog errorDialog = new JFXInfoDialog(addBtnReturnErrorHeadingText, addBtnReturnErrorBodyText, - dialogBtnStyle, 350, 170, main.getPane()); - errorDialog.show(); + JFXInfoAlert errorDialog = new JFXInfoAlert(addBtnReturnErrorHeadingText, addBtnReturnErrorBodyText, + dialogBtnStyle, main.getPrimaryStage()); + errorDialog.showAndWait(); } else { File pictureCache = main.getPictureCache(); diff --git a/src/main/java/com/cemu_UI/controller/UpdateController.java b/src/main/java/com/cemu_UI/controller/UpdateController.java index d214505..03aed13 100644 --- a/src/main/java/com/cemu_UI/controller/UpdateController.java +++ b/src/main/java/com/cemu_UI/controller/UpdateController.java @@ -147,7 +147,7 @@ public class UpdateController implements Runnable { FileUtils.copyInputStreamToFile(pmis, new File("cemu_UI_update.jar")); // download update org.apache.commons.io.FileUtils.copyFile(new File("cemu_UI_update.jar"), new File("cemu_UI.jar")); org.apache.commons.io.FileUtils.deleteQuietly(new File("cemu_UI_update.jar")); // delete update - Runtime.getRuntime().exec("java -jar cemu_UI.jar"); // start again TODO consider ProcessBuilder to execute + new ProcessBuilder("java", "-jar", "cemu_UI.jar").start(); // start the new application System.exit(0); // finishes itself } catch (IOException e) { Platform.runLater(() -> { diff --git a/src/main/java/com/cemu_UI/uiElements/JFXEditGameDialog.java b/src/main/java/com/cemu_UI/uiElements/JFXEditGameDialog.java index 0487b14..78ba990 100644 --- a/src/main/java/com/cemu_UI/uiElements/JFXEditGameDialog.java +++ b/src/main/java/com/cemu_UI/uiElements/JFXEditGameDialog.java @@ -117,8 +117,8 @@ public class JFXEditGameDialog { // addGame error dialog String headingTextError = mwc.getBundle().getString("editGameDialogHeadingTextError"); String bodyTextError = mwc.getBundle().getString("editGameDialogBodyTextError"); - JFXInfoDialog errorDialog = new JFXInfoDialog(headingTextError, bodyTextError, dialogBtnStyle, 350,170, pane); - errorDialog.show(); + JFXInfoAlert errorDialog = new JFXInfoAlert(headingTextError, bodyTextError, dialogBtnStyle, stage); + errorDialog.showAndWait(); } else { switch (mode) { case 0: diff --git a/src/main/java/com/cemu_UI/uiElements/JFXInfoDialog.java b/src/main/java/com/cemu_UI/uiElements/JFXInfoAlert.java similarity index 51% rename from src/main/java/com/cemu_UI/uiElements/JFXInfoDialog.java rename to src/main/java/com/cemu_UI/uiElements/JFXInfoAlert.java index ee2513a..04399aa 100644 --- a/src/main/java/com/cemu_UI/uiElements/JFXInfoDialog.java +++ b/src/main/java/com/cemu_UI/uiElements/JFXInfoAlert.java @@ -1,7 +1,7 @@ /** - * cemu_UI + * Kellerkinder Framework Alerts * - * Copyright 2017-2018 <@Seil0> + * Copyright 2018 <@Seil0> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,66 +20,92 @@ */ package com.cemu_UI.uiElements; +import com.jfoenix.controls.JFXAlert; import com.jfoenix.controls.JFXButton; -import com.jfoenix.controls.JFXDialog; import com.jfoenix.controls.JFXDialogLayout; import javafx.event.ActionEvent; import javafx.event.EventHandler; -import javafx.scene.layout.AnchorPane; -import javafx.scene.layout.Pane; -import javafx.scene.layout.StackPane; import javafx.scene.text.Text; +import javafx.stage.Stage; -public class JFXInfoDialog { - +public class JFXInfoAlert { + private String headingText; private String bodyText; - private String dialogBtnStyle; - private int dialogWidth; - private int dialogHeight; - private Pane pane; + private String btnStyle; + private Stage stage; /** - * Creates a new JFoenix Dialog to show some information - * @param headingText Heading Text, just the heading - * @param bodyText body Text, all other text belongs here - * @param dialogBtnStyle Style of the okay button - * @param dialogWidth dialog width - * @param dialogHeight dialog height - * @param pane pane to which the dialog belongs + * Creates a new JFoenix Alert to show some information + * @param headerText Heading text of the alert + * @param bodyText Content text of the alert + * @param btnStyle Style of the okay button + * @param stage stage to which the dialog belongs */ - public JFXInfoDialog(String headingText, String bodyText, String dialogBtnStyle, int dialogWidth, int dialogHeight, Pane pane) { - this.headingText = headingText; - this.bodyText = bodyText; - this.dialogBtnStyle = dialogBtnStyle; - this.dialogWidth = dialogWidth; - this.dialogHeight = dialogHeight; - this.pane = pane; + public JFXInfoAlert(String headingText, String bodyText, String btnStyle, Stage stage) { + setHeadingText(headingText); + setBodyText(bodyText); + setBtnStyle(btnStyle); + setStage(stage); } - - public void show() { - JFXDialogLayout content = new JFXDialogLayout(); - content.setHeading(new Text(headingText)); - content.setBody(new Text(bodyText)); - content.setPrefSize(dialogWidth, dialogHeight); - StackPane stackPane = new StackPane(); - stackPane.autosize(); - JFXDialog dialog = new JFXDialog(stackPane, content, JFXDialog.DialogTransition.LEFT, true); + + public JFXInfoAlert() { + // Auto-generated constructor stub + } + + public void showAndWait( ) { + JFXAlert alert = new JFXAlert<>(stage); + JFXButton button = new JFXButton("Okay"); button.setOnAction(new EventHandler() { @Override public void handle(ActionEvent event) { - dialog.close(); + alert.close(); } }); button.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED); button.setPrefHeight(32); - button.setStyle(dialogBtnStyle); + button.setStyle(btnStyle); + + JFXDialogLayout content = new JFXDialogLayout(); content.setActions(button); - pane.getChildren().add(stackPane); - AnchorPane.setTopAnchor(stackPane, (pane.getHeight() - content.getPrefHeight()) / 2); - AnchorPane.setLeftAnchor(stackPane, (pane.getWidth() - content.getPrefWidth()) / 2); - dialog.show(); + content.setHeading(new Text(headingText)); + content.setBody(new Text(bodyText)); + alert.setContent(content); + alert.showAndWait(); } -} + + public String getHeadingText() { + return headingText; + } + + public void setHeadingText(String headingText) { + this.headingText = headingText; + } + + public String getBodyText() { + return bodyText; + } + + public void setBodyText(String bodyText) { + this.bodyText = bodyText; + } + + public String getBtnStyle() { + return btnStyle; + } + + public void setBtnStyle(String btnStyle) { + this.btnStyle = btnStyle; + } + + public Stage getStage() { + return stage; + } + + public void setStage(Stage stage) { + this.stage = stage; + } + +} \ No newline at end of file From 9b7a85cabec2bcfbb4edccbd72ec3ca487879323 Mon Sep 17 00:00:00 2001 From: Jannik Date: Tue, 12 Jun 2018 16:24:12 +0200 Subject: [PATCH 06/15] code clean up --- .../java/com/cemu_UI/application/Main.java | 104 ++++++++---------- .../application/MainWindowController.java | 86 +++++---------- src/main/resources/fxml/MainWindow.fxml | 2 +- 3 files changed, 72 insertions(+), 120 deletions(-) diff --git a/src/main/java/com/cemu_UI/application/Main.java b/src/main/java/com/cemu_UI/application/Main.java index 6879180..7d922e3 100644 --- a/src/main/java/com/cemu_UI/application/Main.java +++ b/src/main/java/com/cemu_UI/application/Main.java @@ -47,7 +47,6 @@ import javafx.scene.control.ButtonType; import javafx.scene.control.Alert.AlertType; import javafx.scene.layout.AnchorPane; - public class Main extends Application { private Stage primaryStage; @@ -63,13 +62,12 @@ public class Main extends Application { private static String javaVers = System.getProperty("java.version"); private static String javaVend= System.getProperty("java.vendor"); private String gamesDBdownloadURL = "https://github.com/Seil0/cemu_UI/raw/master/downloadContent/games.db"; - public String dirWin = userHome + "/Documents/cemu_UI"; // Windows: C:/Users/"User"/Documents/cemu_UI - public String dirLinux = userHome + "/cemu_UI"; // Linux: /home/"User"/cemu_UI - private File directory; - private File configFile; - private File gamesDBFile; - private File reference_gamesFile; - private File pictureCache; + private static String dirCemuUI; + private static File directory; + private static File configFile; + private static File gamesDBFile; + private static File reference_gamesFile; + private static File pictureCache; private static Logger LOGGER; @Override @@ -78,7 +76,10 @@ public class Main extends Application { LOGGER.info("OS: " + osName + " " + osVers + " " + osArch); LOGGER.info("Java: " + javaVend + " " + javaVers); LOGGER.info("User: " + userName + " " + userHome); + this.primaryStage = primaryStage; + mainWindowController = new MainWindowController(this); + mainWindow(); initActions(); } catch (Exception e) { @@ -91,28 +92,21 @@ public class Main extends Application { try { FXMLLoader loader = new FXMLLoader(); loader.setLocation(ClassLoader.getSystemResource("fxml/MainWindow.fxml")); + loader.setController(mainWindowController); pane = (AnchorPane) loader.load(); + primaryStage.setMinWidth(265.00); + primaryStage.setMinHeight(425.00); primaryStage.setTitle("cemu_UI"); -// primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/resources/Homeflix_Icon_64x64.png"))); //adds application icon - - mainWindowController = loader.getController(); // Link of FXMLController and controller class - mainWindowController.setMain(this); // call setMain - cloudController = new CloudController(mainWindowController); // call cloudController constructor +// primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream(""))); //adds application icon + primaryStage.setOnCloseRequest(event -> System.exit(1)); - // get OS and the specific paths - if (osName.equals("Linux")) { - directory = new File(dirLinux); - configFile = new File(dirLinux + "/config.xml"); - gamesDBFile = new File(dirLinux + "/games.db"); - reference_gamesFile = new File(dirLinux + "/reference_games.db"); - pictureCache= new File(dirLinux+"/picture_cache"); - } else { - directory = new File(dirWin); - configFile = new File(dirWin + "/config.xml"); - gamesDBFile = new File(dirWin + "/games.db"); - reference_gamesFile = new File(dirWin + "/reference_games.db"); - pictureCache= new File(dirWin+"/picture_cache"); - } + // generate window + scene = new Scene(pane); // create new scene, append pane to scene + scene.getStylesheets().add(Main.class.getResource("/css/MainWindows.css").toExternalForm()); + primaryStage.setScene(scene); // append scene to stage + primaryStage.show(); // show stage + + cloudController = new CloudController(mainWindowController); // call cloudController constructor // startup checks // check if client_secret.json is present @@ -165,14 +159,6 @@ public class Main extends Application { } } - // generate window - scene = new Scene(pane); // create new scene, append pane to scene - scene.getStylesheets().add(Main.class.getResource("/css/MainWindows.css").toExternalForm()); - primaryStage.setMinWidth(265.00); - primaryStage.setMinHeight(425.00); - primaryStage.setScene(scene); // append scene to stage - primaryStage.show(); // show stage - // init here as it loads the games to the mwc and the gui, therefore the window must exist mainWindowController.init(); mainWindowController.getDbController().init(); @@ -183,9 +169,31 @@ public class Main extends Application { cloudController.sync(mainWindowController.getCloudService(), mainWindowController.getCemuPath(), directory.getPath()); } - } catch (IOException e) { - e.printStackTrace(); - } + } catch (IOException e) { + e.printStackTrace(); + } + } + + public static void main(String[] args) { + + if (osName.contains("Windows")) { + dirCemuUI = userHome + "/Documents/cemu_UI"; + } else { + dirCemuUI = userHome + "/cemu_UI"; + } + + directory = new File(dirCemuUI); + configFile = new File(dirCemuUI + "/config.xml"); + gamesDBFile = new File(dirCemuUI + "/games.db"); + reference_gamesFile = new File(dirCemuUI + "/reference_games.db"); + pictureCache= new File(dirCemuUI+"/picture_cache"); + + // delete old log file and create new + System.setProperty("logFilename", dirCemuUI + "/app.log"); + File logFile = new File(dirCemuUI + "/app.log"); + logFile.delete(); + LOGGER = LogManager.getLogger(Main.class.getName()); + launch(args); } private void firstStart() { @@ -291,26 +299,6 @@ public class Main extends Application { primaryStage.heightProperty().addListener(heightListener); primaryStage.maximizedProperty().addListener(maximizeListener); } - - public static void main(String[] args) { - // delete old log file and create new - if (osName.equals("Linux")) { - System.setProperty("logFilename", userHome + "/cemu_UI/app.log"); - File logFile = new File(userHome + "/cemu_UI/app.log"); - logFile.delete(); - } else { - System.setProperty("logFilename", userHome + "/Documents/cemu_UI/app.log"); - File logFile = new File(userHome + "/Documents/cemu_UI/app.log"); - logFile.delete(); - } - LOGGER = LogManager.getLogger(Main.class.getName()); - launch(args); - } - - @Override - public void stop() { - System.exit(0); - } public Stage getPrimaryStage() { return primaryStage; diff --git a/src/main/java/com/cemu_UI/application/MainWindowController.java b/src/main/java/com/cemu_UI/application/MainWindowController.java index a675138..b7490c9 100644 --- a/src/main/java/com/cemu_UI/application/MainWindowController.java +++ b/src/main/java/com/cemu_UI/application/MainWindowController.java @@ -111,37 +111,26 @@ public class MainWindowController { @FXML private JFXButton aboutBtn; - @FXML private JFXButton settingsBtn; - @FXML private JFXButton addBtn; - @FXML private JFXButton reloadRomsBtn; - @FXML private JFXButton smmdbBtn; - @FXML private JFXButton cemuTFBtn; - @FXML private JFXButton romTFBtn; - @FXML private JFXButton updateBtn; - @FXML private JFXButton smmdbDownloadBtn; - @FXML private JFXButton playBtn; - @FXML private JFXButton lastTimePlayedBtn; - @FXML JFXButton totalPlaytimeBtn; @@ -150,58 +139,46 @@ public class MainWindowController { @FXML private JFXTextField cemuTextField; - @FXML private JFXTextField romTextField; - @FXML private JFXTextField courseSearchTextFiled; - @FXML private JFXTextField executeCommandTextFiled; - + @FXML private TextFlow smmdbTextFlow; - + @FXML private JFXColorPicker colorPicker; - + @FXML private JFXToggleButton cloudSyncToggleBtn; - @FXML private JFXToggleButton autoUpdateToggleBtn; - @FXML private JFXToggleButton fullscreenToggleBtn; @FXML private ChoiceBox languageChoisBox; - @FXML private ChoiceBox branchChoisBox; @FXML private AnchorPane mainAnchorPane; - @FXML private AnchorPane gamesAnchorPane; - @FXML private AnchorPane settingsAnchorPane; - @FXML private AnchorPane smmdbAnchorPane; @FXML private ScrollPane mainScrollPane; - @FXML private ScrollPane settingsScrollPane; - @FXML private ScrollPane smmdbScrollPane; - @FXML private ScrollPane smmdbImageViewScrollPane; @@ -210,7 +187,6 @@ public class MainWindowController { @FXML private HBox topHBox; - @FXML private HBox bottomHBox; @@ -219,31 +195,22 @@ public class MainWindowController { @FXML private Label helpLbl; - @FXML private Label cemu_UISettingsLbl; - @FXML private Label cemuDirectoryLbl; - @FXML private Label romDirectoryLbl; - @FXML private Label mainColorLbl; - @FXML private Label languageLbl; - @FXML private Label updateLbl; - @FXML private Label branchLbl; - @FXML private Label cemuSettingsLbl; - @FXML private Label licensesLbl; @@ -251,17 +218,14 @@ public class MainWindowController { private JFXTreeTableView courseTreeTable = new JFXTreeTableView(); @FXML - TreeItem root = new TreeItem<>(new CourseTableDataType("", "", 0, 0)); + private TreeItem root = new TreeItem<>(new CourseTableDataType("", "", 0, 0)); @FXML private JFXTreeTableColumn titleColumn = new JFXTreeTableColumn<>("title"); - @FXML private JFXTreeTableColumn idColumn = new JFXTreeTableColumn<>("id"); - @FXML private JFXTreeTableColumn starsColumn = new JFXTreeTableColumn<>("stars"); - @FXML private JFXTreeTableColumn timeColumn = new JFXTreeTableColumn<>("time"); @@ -294,7 +258,7 @@ public class MainWindowController { private String selectedGameTitle; private String id; private String version = "0.3.0"; - private String buildNumber = "077"; + private String buildNumber = "079"; private String versionName = "Purple Comet"; private int xPos = -200; private int yPos = 17; @@ -372,8 +336,8 @@ public class MainWindowController { private String smmdbDownloadBtnLoading; private String smmdbDownloadBtnDownload; - public void setMain(Main m) { - this.main = m; + public MainWindowController(Main main) { + this.main = main; dbController = new DBController(main, this); smmdbAPIController = new SmmdbAPIController(); } @@ -382,7 +346,7 @@ public class MainWindowController { * initialize the MainWindowController * loadSettings, checkAutoUpdate, initUI and initActions */ - void init() { + public void init() { loadSettings(); checkAutoUpdate(); initUI(); @@ -837,7 +801,7 @@ public class MainWindowController { } @FXML - void detailsSlideoutBtnAction() { + private void detailsSlideoutBtnAction() { playBtnSlideOut(); } @@ -851,7 +815,7 @@ public class MainWindowController { } @FXML - void settingsBtnAction() { + private void settingsBtnAction() { if (smmdbTrue) { smmdbAnchorPane.setVisible(false); smmdbTrue = false; @@ -867,12 +831,12 @@ public class MainWindowController { } @FXML - void reloadRomsBtnAction() throws IOException { + private void reloadRomsBtnAction() throws IOException { reloadRoms(); } @FXML - void smmdbBtnAction() { + private void smmdbBtnAction() { // show smmdbAnchorPane if (smmdbTrue) { smmdbAnchorPane.setVisible(false); @@ -911,7 +875,7 @@ public class MainWindowController { } @FXML - void playBtnAction() throws InterruptedException, IOException { + private void playBtnAction() throws InterruptedException, IOException { dbController.setLastPlayed(selectedGameTitleID); playGame = new playGame(this, dbController); @@ -919,17 +883,17 @@ public class MainWindowController { } @FXML - void totalPlaytimeBtnAction() { + private void totalPlaytimeBtnAction() { } @FXML - void lastTimePlayedBtnAction() { + private void lastTimePlayedBtnAction() { } @FXML - void cemuTFBtnAction() { + private void cemuTFBtnAction() { File cemuDirectory = directoryChooser.showDialog(main.getPrimaryStage()); if (cemuDirectory != null) { cemuTextField.setText(cemuDirectory.getAbsolutePath()); @@ -937,7 +901,7 @@ public class MainWindowController { } @FXML - void romTFBtnAction() { + private void romTFBtnAction() { File romDirectory = directoryChooser.showDialog(main.getPrimaryStage()); if (romDirectory != null) { romTextField.setText(romDirectory.getAbsolutePath()); @@ -945,7 +909,7 @@ public class MainWindowController { } @FXML - void updateBtnAction() { + private void updateBtnAction() { updateController = new UpdateController(this, buildNumber, useBeta); Thread updateThread = new Thread(updateController); updateThread.setName("Updater"); @@ -953,7 +917,7 @@ public class MainWindowController { } @FXML - void autoUpdateToggleBtnAction() { + private void autoUpdateToggleBtnAction() { if (isAutoUpdate()) { setAutoUpdate(false); } else { @@ -963,12 +927,12 @@ public class MainWindowController { } @FXML - void courseSearchTextFiledAction() { + private void courseSearchTextFiledAction() { // not in use } @FXML - void smmdbDownloadBtnAction() { + private void smmdbDownloadBtnAction() { String downloadUrl = "http://smmdb.ddns.net/api/downloadcourse?id=" + id + "&type=zip"; String downloadFileURL = getCemuPath() + "/" + id + ".zip"; // getCemuPath() + "/" + smmID + "/" + id + ".rar" String outputFile = getCemuPath() + "/"; @@ -1036,7 +1000,7 @@ public class MainWindowController { } @FXML - void fullscreenToggleBtnAction() { + private void fullscreenToggleBtnAction() { if (fullscreen) { fullscreen = false; } else { @@ -1046,7 +1010,7 @@ public class MainWindowController { } @FXML - void cloudSyncToggleBtnAction() { + private void cloudSyncToggleBtnAction() { if(cloudSync) { cloudSync = false; } else { @@ -1096,13 +1060,13 @@ public class MainWindowController { } @FXML - void colorPickerAction() { + private void colorPickerAction() { editColor(colorPicker.getValue().toString()); applyColor(); } @FXML - void addBtnAction() { + private void addBtnAction() { String headingText = addGameBtnHeadingText; String bodyText = addGameBtnBodyText; JFXEditGameDialog addGameDialog = new JFXEditGameDialog(headingText, bodyText, dialogBtnStyle, 450, 300, 0, diff --git a/src/main/resources/fxml/MainWindow.fxml b/src/main/resources/fxml/MainWindow.fxml index c9dde2c..d7ed28e 100644 --- a/src/main/resources/fxml/MainWindow.fxml +++ b/src/main/resources/fxml/MainWindow.fxml @@ -18,7 +18,7 @@ - + From 41a0becd4f5de3c1d335813aa4bb6b234330880b Mon Sep 17 00:00:00 2001 From: Jannik Date: Wed, 13 Jun 2018 13:49:47 +0200 Subject: [PATCH 07/15] typo --- src/main/resources/locals/cemu_UI-Local_de_DE.properties | 4 ++-- src/main/resources/locals/cemu_UI-Local_en_US.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/locals/cemu_UI-Local_de_DE.properties b/src/main/resources/locals/cemu_UI-Local_de_DE.properties index 598d579..4c89c89 100644 --- a/src/main/resources/locals/cemu_UI-Local_de_DE.properties +++ b/src/main/resources/locals/cemu_UI-Local_de_DE.properties @@ -1,4 +1,4 @@ -#HomeFlix-Local_de_DE.properties geramn Local +#HomeFlix-Local_de_DE.properties DE-Deutsch Local # Buttons aboutBtn = \u00dcber @@ -46,7 +46,7 @@ licensesLblBodyText = cemu_UI ist lizensiert unter der GNU GPL 3.\n\nJFoenix, Ap showLicenses = Lizenzen \u00f6ffnen aboutBtnHeadingText = cemu_UI -aboutBtnBodyText = Diese Programm wurde mit freier Software erstellt\nund ist lizensiert unter der GNU GPL 3.\n\nwww.kellerkinder.xyz +aboutBtnBodyText = Diese Programm wurde mit freier Software erstellt\nund ist lizensiert unter der GNU GPL 3.\n\nwww.mosad.xyz cloudSyncWaringHeadingText = Spielst\u00e4nde über die Cloud syncronisieren (beta) cloudSyncWaringBodyText = WARNING this is a completly WIP cloud save integration,\nit's NOT recomended to use this!!\n\nUse it on your own risk and backup everthing before! diff --git a/src/main/resources/locals/cemu_UI-Local_en_US.properties b/src/main/resources/locals/cemu_UI-Local_en_US.properties index 043d926..4a335a1 100644 --- a/src/main/resources/locals/cemu_UI-Local_en_US.properties +++ b/src/main/resources/locals/cemu_UI-Local_en_US.properties @@ -46,7 +46,7 @@ licensesLblBodyText = cemu_UI is licensed under the terms of GNU GPL 3.\n\nJFoen showLicenses = show licenses aboutBtnHeadingText = cemu_UI -aboutBtnBodyText = This Application is made with free Software\nand licensed under the terms of GNU GPL 3.\n\nwww.kellerkinder.xyz +aboutBtnBodyText = This Application is made with free Software\nand licensed under the terms of GNU GPL 3.\n\nwww.mosad.xyz cloudSyncWaringHeadingText = activate cloud savegame sync (beta) cloudSyncWaringBodyText = WARNING this is a completely WIP cloud save integration,\nit's NOT recommended to use this!!\n\nUse it on your own risk and backup everything before! From f195addea8bca28ba8bde4b424e0db7ef0eaa8ff Mon Sep 17 00:00:00 2001 From: Jannik Date: Wed, 13 Jun 2018 18:29:16 +0200 Subject: [PATCH 08/15] version 0.3.1 (81) --- .../java/com/cemu_UI/application/MainWindowController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/cemu_UI/application/MainWindowController.java b/src/main/java/com/cemu_UI/application/MainWindowController.java index b7490c9..80c6f34 100644 --- a/src/main/java/com/cemu_UI/application/MainWindowController.java +++ b/src/main/java/com/cemu_UI/application/MainWindowController.java @@ -257,8 +257,8 @@ public class MainWindowController { private String selectedGameTitleID; private String selectedGameTitle; private String id; - private String version = "0.3.0"; - private String buildNumber = "079"; + private String version = "0.3.1"; + private String buildNumber = "081"; private String versionName = "Purple Comet"; private int xPos = -200; private int yPos = 17; From b610dc337b0a05927c38f4cea944cd8c5fe2501b Mon Sep 17 00:00:00 2001 From: Seil0 Date: Thu, 14 Jun 2018 15:24:33 +0200 Subject: [PATCH 09/15] =?UTF-8?q?'README.md'=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 1a3f92a..3926839 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,14 @@ [![HitCount](http://hits.dwyl.io/Seil0/cemu_UI.svg)](http://hits.dwyl.io/Seil0/cemu_UI) [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-3.0) -cemu_UI is a simple, material design graphical frontend for [cemu](http://cemu.info/), a Wii U emulator. Downloads can be found [here](https://github.com/Seil0/cemu_UI/releases). +cemu_UI is a simple, material design graphical frontend for [cemu](http://cemu.info/), a Wii U emulator. Downloads can be found [here](https://git.mosad.xyz/Seil0/cemu_UI/releases). ## Installation -Simply download the cemu_UI.jar from [releases](https://github.com/Seil0/cemu_UI/releases), make sure you have the latest version of java 8 oracle jre/jdk installed and open the file. cemu_UI creats a new directory "C:\Users\USERNAME\Documents\cemu_UI", where the database, settings and covers are stored. **first start can take while!** +Simply download the cemu_UI.jar from [Releases](https://git.mosad.xyz/Seil0/cemu_UI/releases), make sure you have the latest version of java 8 oracle jre/jdk installed and open the file. cemu_UI creats a new directory "C:\Users\USERNAME\Documents\cemu_UI", where the database, settings and covers are stored. **first start can take while!** -If you want to use the cloud sync function read the [wiki](https://github.com/Seil0/cemu_UI/wiki#cloud-savegame-syncronisation) carefully! +If you want to use the cloud sync function read the [wiki](https://git.mosad.xyz/Seil0/cemu_UI/wiki#cloud-savegame-syncronisation) carefully! -### [FAQ](https://github.com/Seil0/cemu_UI/wiki#faq) +### [FAQ](https://git.mosad.xyz/Seil0/cemu_UI/wiki#faq) ## Features @@ -23,19 +23,17 @@ If you want to use the cloud sync function read the [wiki](https://github.com/Se * add updates and dlcs easier (only adding not downloading!) * automatic rom detection (only .rpx files with a app.xml) * customisable UI -* [sync savegames via google drive](https://github.com/Seil0/cemu_UI/wiki) +* [sync savegames via google drive](https://git.mosad.xyz/Seil0/cemu_UI/wiki) * [smmdb api](https://github.com/Tarnadas/smmdb) integration -## [planed Features](https://github.com/Seil0/cemu_UI/projects/1) (no ETA) +## [planed Features](https://git.mosad.xyz/Seil0/cemu_UI/milestones) * Controller support -### If you have another idea, make a "new issue" with the ![#f03c15](https://placehold.it/15/fbca04/000000?text=+)`idea` lable +### If you have another idea, make a new issue! -### [building from source](https://github.com/Seil0/cemu_UI/wiki/Documantation) +### [building from source](https://git.mosad.xyz/Seil0/cemu_UI/wiki/Documantation) ## Screenshots - -![Screenshot](/downloadContent/cemu_UI4.png) - - + +![Screenshot](https://git.mosad.xyz/Seil0/cemu_UI/raw/branch/master/downloadContent/cemu_UI4.png) \ No newline at end of file From 9839c303dabeca5eb1855f97c14879373c95b6c4 Mon Sep 17 00:00:00 2001 From: Jannik Date: Sat, 16 Jun 2018 00:03:23 +0200 Subject: [PATCH 10/15] download the games.db from gitea --- src/main/java/com/cemu_UI/application/Main.java | 4 ++-- .../java/com/cemu_UI/application/MainWindowController.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/cemu_UI/application/Main.java b/src/main/java/com/cemu_UI/application/Main.java index 7d922e3..d0f4830 100644 --- a/src/main/java/com/cemu_UI/application/Main.java +++ b/src/main/java/com/cemu_UI/application/Main.java @@ -61,7 +61,7 @@ public class Main extends Application { private static String osVers = System.getProperty("os.version"); private static String javaVers = System.getProperty("java.version"); private static String javaVend= System.getProperty("java.vendor"); - private String gamesDBdownloadURL = "https://github.com/Seil0/cemu_UI/raw/master/downloadContent/games.db"; + private String gamesDBdownloadURL = "https://git.mosad.xyz/Seil0/cemu_UI/raw/branch/master/downloadContent/games.db"; private static String dirCemuUI; private static File directory; private static File configFile; @@ -116,7 +116,7 @@ public class Main extends Application { Alert alert = new Alert(AlertType.ERROR); alert.setTitle("cemu_UI"); alert.setHeaderText("Error"); - alert.setContentText("client_secret is missing! Please contact the maintainer. \nIf you compiled cemu_UI by yourself see: \nhttps://github.com/Seil0/cemu_UI/wiki/Documantation"); + alert.setContentText("client_secret is missing! Please contact the maintainer. \nIf you compiled cemu_UI by yourself see: \nhttps://git.mosad.xyz/Seil0/cemu_UI/wiki/Documantation"); alert.showAndWait(); } diff --git a/src/main/java/com/cemu_UI/application/MainWindowController.java b/src/main/java/com/cemu_UI/application/MainWindowController.java index 80c6f34..99e6640 100644 --- a/src/main/java/com/cemu_UI/application/MainWindowController.java +++ b/src/main/java/com/cemu_UI/application/MainWindowController.java @@ -685,7 +685,7 @@ public class MainWindowController { @Override public void run() { try { - Desktop.getDesktop().browse(new URI("https://github.com/Seil0/cemu_UI/issues/3")); + Desktop.getDesktop().browse(new URI("https://git.mosad.xyz/Seil0/cemu_UI/issues/3")); } catch (IOException | URISyntaxException e) { LOGGER.error("An error ocoured while trying to open a Website.", e); } From fb1fd442f70328980ef84c7311c6c5cd64dc2b26 Mon Sep 17 00:00:00 2001 From: Seil0 Date: Sat, 16 Jun 2018 12:04:43 +0200 Subject: [PATCH 11/15] =?UTF-8?q?'README.md'=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 3926839..4da4e59 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,7 @@ # cemu_UI ![Total Downloads](https://img.shields.io/github/downloads/Seil0/cemu_UI/total.svg?style=flat-square) -[![Build](https://img.shields.io/travis/Seil0/cemu_UI/master.svg?style=flat-square)](https://travis-ci.org/Seil0/cemu_UI) -[![Latest](https://img.shields.io/github/release/Seil0/cemu_UI/all.svg?style=flat-square)](https://github.com/Seil0/cemu_UI/releases) -[![HitCount](http://hits.dwyl.io/Seil0/cemu_UI.svg)](http://hits.dwyl.io/Seil0/cemu_UI) +[![Latest](https://img.shields.io/github/release/Seil0/cemu_UI/all.svg?style=flat-square)](https://git.mosad.xyz/Seil0/cemu_UI/releases) [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-3.0) cemu_UI is a simple, material design graphical frontend for [cemu](http://cemu.info/), a Wii U emulator. Downloads can be found [here](https://git.mosad.xyz/Seil0/cemu_UI/releases). From d082482844fcde8e77c5d732de685de2fb9e7459 Mon Sep 17 00:00:00 2001 From: Jannik Date: Mon, 18 Jun 2018 13:54:46 +0200 Subject: [PATCH 12/15] updated readme --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4da4e59..6b88f14 100644 --- a/README.md +++ b/README.md @@ -34,4 +34,6 @@ If you want to use the cloud sync function read the [wiki](https://git.mosad.xyz ## Screenshots -![Screenshot](https://git.mosad.xyz/Seil0/cemu_UI/raw/branch/master/downloadContent/cemu_UI4.png) \ No newline at end of file +![Screenshot](https://git.mosad.xyz/Seil0/cemu_UI/raw/branch/master/downloadContent/cemu_UI4.png) + +delete this line From 010f109597d4d4d7d00bf4f6b98b96109de98c6b Mon Sep 17 00:00:00 2001 From: Jannik Date: Mon, 18 Jun 2018 15:13:09 +0200 Subject: [PATCH 13/15] updated readme --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 6b88f14..93082d9 100644 --- a/README.md +++ b/README.md @@ -35,5 +35,3 @@ If you want to use the cloud sync function read the [wiki](https://git.mosad.xyz ## Screenshots ![Screenshot](https://git.mosad.xyz/Seil0/cemu_UI/raw/branch/master/downloadContent/cemu_UI4.png) - -delete this line From 9e58a3039096c60bf6cc9c693c47489c8c8f8d9d Mon Sep 17 00:00:00 2001 From: Jannik Date: Mon, 18 Jun 2018 15:14:34 +0200 Subject: [PATCH 14/15] updated readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 93082d9..6b88f14 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,5 @@ If you want to use the cloud sync function read the [wiki](https://git.mosad.xyz ## Screenshots ![Screenshot](https://git.mosad.xyz/Seil0/cemu_UI/raw/branch/master/downloadContent/cemu_UI4.png) + +delete this line From d46eace9d5c260dd97c6788bd4f8aec991f7b652 Mon Sep 17 00:00:00 2001 From: Jannik Date: Mon, 18 Jun 2018 15:19:47 +0200 Subject: [PATCH 15/15] updated readme --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 6b88f14..93082d9 100644 --- a/README.md +++ b/README.md @@ -35,5 +35,3 @@ If you want to use the cloud sync function read the [wiki](https://git.mosad.xyz ## Screenshots ![Screenshot](https://git.mosad.xyz/Seil0/cemu_UI/raw/branch/master/downloadContent/cemu_UI4.png) - -delete this line