release 0.3.1 (081) #4
|
@ -1,3 +1,4 @@
|
||||||
language: java
|
language: java
|
||||||
jdk:
|
jdk:
|
||||||
- oraclejdk9
|
- oraclejdk9
|
||||||
|
- oraclejdk10
|
||||||
|
|
24
README.md
24
README.md
|
@ -1,19 +1,17 @@
|
||||||
# cemu_UI
|
# cemu_UI
|
||||||
|
|
||||||
![Total Downloads](https://img.shields.io/github/downloads/Seil0/cemu_UI/total.svg?style=flat-square)
|
![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://git.mosad.xyz/Seil0/cemu_UI/releases)
|
||||||
[![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)
|
|
||||||
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-3.0)
|
[![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
|
## 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 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://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
|
## Features
|
||||||
|
|
||||||
|
@ -23,19 +21,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!)
|
* add updates and dlcs easier (only adding not downloading!)
|
||||||
* automatic rom detection (only .rpx files with a app.xml)
|
* automatic rom detection (only .rpx files with a app.xml)
|
||||||
* customisable UI
|
* 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
|
* [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
|
* 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
|
## Screenshots
|
||||||
|
|
||||||
![Screenshot](/downloadContent/cemu_UI4.png)
|
![Screenshot](https://git.mosad.xyz/Seil0/cemu_UI/raw/branch/master/downloadContent/cemu_UI4.png)
|
||||||
|
|
||||||
|
|
||||||
|
|
12
pom.xml
12
pom.xml
|
@ -19,14 +19,14 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>4.11</version>
|
<version>4.12</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.jfoenix</groupId>
|
<groupId>com.jfoenix</groupId>
|
||||||
<artifactId>jfoenix</artifactId>
|
<artifactId>jfoenix</artifactId>
|
||||||
<version>9.0.3</version>
|
<version>9.0.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.xerial</groupId>
|
<groupId>org.xerial</groupId>
|
||||||
<artifactId>sqlite-jdbc</artifactId>
|
<artifactId>sqlite-jdbc</artifactId>
|
||||||
<version>3.21.0.1</version>
|
<version>3.23.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.apis</groupId>
|
<groupId>com.google.apis</groupId>
|
||||||
<artifactId>google-api-services-drive</artifactId>
|
<artifactId>google-api-services-drive</artifactId>
|
||||||
<version>v3-rev99-1.23.0</version>
|
<version>v3-rev120-1.23.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/com.google.http-client/google-http-client -->
|
<!-- https://mvnrepository.com/artifact/com.google.http-client/google-http-client -->
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-core</artifactId>
|
<artifactId>jackson-core</artifactId>
|
||||||
<version>2.9.4</version>
|
<version>2.9.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
|
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
|
||||||
|
@ -195,7 +195,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.1.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
|
|
@ -47,7 +47,6 @@ import javafx.scene.control.ButtonType;
|
||||||
import javafx.scene.control.Alert.AlertType;
|
import javafx.scene.control.Alert.AlertType;
|
||||||
import javafx.scene.layout.AnchorPane;
|
import javafx.scene.layout.AnchorPane;
|
||||||
|
|
||||||
|
|
||||||
public class Main extends Application {
|
public class Main extends Application {
|
||||||
|
|
||||||
private Stage primaryStage;
|
private Stage primaryStage;
|
||||||
|
@ -62,14 +61,13 @@ public class Main extends Application {
|
||||||
private static String osVers = System.getProperty("os.version");
|
private static String osVers = System.getProperty("os.version");
|
||||||
private static String javaVers = System.getProperty("java.version");
|
private static String javaVers = System.getProperty("java.version");
|
||||||
private static String javaVend= System.getProperty("java.vendor");
|
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";
|
||||||
public String dirWin = userHome + "/Documents/cemu_UI"; // Windows: C:/Users/"User"/Documents/cemu_UI
|
private static String dirCemuUI;
|
||||||
public String dirLinux = userHome + "/cemu_UI"; // Linux: /home/"User"/cemu_UI
|
private static File directory;
|
||||||
private File directory;
|
private static File configFile;
|
||||||
private File configFile;
|
private static File gamesDBFile;
|
||||||
private File gamesDBFile;
|
private static File reference_gamesFile;
|
||||||
private File reference_gamesFile;
|
private static File pictureCache;
|
||||||
private File pictureCache;
|
|
||||||
private static Logger LOGGER;
|
private static Logger LOGGER;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -78,7 +76,10 @@ public class Main extends Application {
|
||||||
LOGGER.info("OS: " + osName + " " + osVers + " " + osArch);
|
LOGGER.info("OS: " + osName + " " + osVers + " " + osArch);
|
||||||
LOGGER.info("Java: " + javaVend + " " + javaVers);
|
LOGGER.info("Java: " + javaVend + " " + javaVers);
|
||||||
LOGGER.info("User: " + userName + " " + userHome);
|
LOGGER.info("User: " + userName + " " + userHome);
|
||||||
|
|
||||||
this.primaryStage = primaryStage;
|
this.primaryStage = primaryStage;
|
||||||
|
mainWindowController = new MainWindowController(this);
|
||||||
|
|
||||||
mainWindow();
|
mainWindow();
|
||||||
initActions();
|
initActions();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -91,29 +92,22 @@ public class Main extends Application {
|
||||||
try {
|
try {
|
||||||
FXMLLoader loader = new FXMLLoader();
|
FXMLLoader loader = new FXMLLoader();
|
||||||
loader.setLocation(ClassLoader.getSystemResource("fxml/MainWindow.fxml"));
|
loader.setLocation(ClassLoader.getSystemResource("fxml/MainWindow.fxml"));
|
||||||
|
loader.setController(mainWindowController);
|
||||||
pane = (AnchorPane) loader.load();
|
pane = (AnchorPane) loader.load();
|
||||||
|
primaryStage.setMinWidth(265.00);
|
||||||
|
primaryStage.setMinHeight(425.00);
|
||||||
primaryStage.setTitle("cemu_UI");
|
primaryStage.setTitle("cemu_UI");
|
||||||
// primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/resources/Homeflix_Icon_64x64.png"))); //adds application icon
|
// primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream(""))); //adds application icon
|
||||||
|
primaryStage.setOnCloseRequest(event -> System.exit(1));
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
mainWindowController = loader.getController(); // Link of FXMLController and controller class
|
|
||||||
mainWindowController.setMain(this); // call setMain
|
|
||||||
cloudController = new CloudController(mainWindowController); // call cloudController constructor
|
cloudController = new CloudController(mainWindowController); // call cloudController constructor
|
||||||
|
|
||||||
// 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");
|
|
||||||
}
|
|
||||||
|
|
||||||
// startup checks
|
// startup checks
|
||||||
// check if client_secret.json is present
|
// check if client_secret.json is present
|
||||||
if (Main.class.getResourceAsStream("/client_secret.json") == null) {
|
if (Main.class.getResourceAsStream("/client_secret.json") == null) {
|
||||||
|
@ -122,7 +116,7 @@ public class Main extends Application {
|
||||||
Alert alert = new Alert(AlertType.ERROR);
|
Alert alert = new Alert(AlertType.ERROR);
|
||||||
alert.setTitle("cemu_UI");
|
alert.setTitle("cemu_UI");
|
||||||
alert.setHeaderText("Error");
|
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();
|
alert.showAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
// init here as it loads the games to the mwc and the gui, therefore the window must exist
|
||||||
mainWindowController.init();
|
mainWindowController.init();
|
||||||
mainWindowController.getDbController().init();
|
mainWindowController.getDbController().init();
|
||||||
|
@ -188,6 +174,28 @@ public class Main extends Application {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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() {
|
private void firstStart() {
|
||||||
Alert alert = new Alert(AlertType.CONFIRMATION); // new alert with file-chooser
|
Alert alert = new Alert(AlertType.CONFIRMATION); // new alert with file-chooser
|
||||||
alert.setTitle("cemu_UI");
|
alert.setTitle("cemu_UI");
|
||||||
|
@ -292,26 +300,6 @@ public class Main extends Application {
|
||||||
primaryStage.maximizedProperty().addListener(maximizeListener);
|
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() {
|
public Stage getPrimaryStage() {
|
||||||
return primaryStage;
|
return primaryStage;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ import com.cemu_UI.datatypes.CourseTableDataType;
|
||||||
import com.cemu_UI.datatypes.SmmdbApiDataType;
|
import com.cemu_UI.datatypes.SmmdbApiDataType;
|
||||||
import com.cemu_UI.datatypes.UIROMDataType;
|
import com.cemu_UI.datatypes.UIROMDataType;
|
||||||
import com.cemu_UI.uiElements.JFXEditGameDialog;
|
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.JFXOkayCancelDialog;
|
||||||
import com.cemu_UI.uiElements.JFXTextAreaInfoDialog;
|
import com.cemu_UI.uiElements.JFXTextAreaInfoDialog;
|
||||||
import com.jfoenix.controls.JFXButton;
|
import com.jfoenix.controls.JFXButton;
|
||||||
|
@ -111,37 +111,26 @@ public class MainWindowController {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton aboutBtn;
|
private JFXButton aboutBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton settingsBtn;
|
private JFXButton settingsBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton addBtn;
|
private JFXButton addBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton reloadRomsBtn;
|
private JFXButton reloadRomsBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton smmdbBtn;
|
private JFXButton smmdbBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton cemuTFBtn;
|
private JFXButton cemuTFBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton romTFBtn;
|
private JFXButton romTFBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton updateBtn;
|
private JFXButton updateBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton smmdbDownloadBtn;
|
private JFXButton smmdbDownloadBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton playBtn;
|
private JFXButton playBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton lastTimePlayedBtn;
|
private JFXButton lastTimePlayedBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
JFXButton totalPlaytimeBtn;
|
JFXButton totalPlaytimeBtn;
|
||||||
|
|
||||||
|
@ -150,13 +139,10 @@ public class MainWindowController {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXTextField cemuTextField;
|
private JFXTextField cemuTextField;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXTextField romTextField;
|
private JFXTextField romTextField;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXTextField courseSearchTextFiled;
|
private JFXTextField courseSearchTextFiled;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXTextField executeCommandTextFiled;
|
private JFXTextField executeCommandTextFiled;
|
||||||
|
|
||||||
|
@ -168,40 +154,31 @@ public class MainWindowController {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXToggleButton cloudSyncToggleBtn;
|
private JFXToggleButton cloudSyncToggleBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXToggleButton autoUpdateToggleBtn;
|
private JFXToggleButton autoUpdateToggleBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXToggleButton fullscreenToggleBtn;
|
private JFXToggleButton fullscreenToggleBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ChoiceBox<String> languageChoisBox;
|
private ChoiceBox<String> languageChoisBox;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ChoiceBox<String> branchChoisBox;
|
private ChoiceBox<String> branchChoisBox;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private AnchorPane mainAnchorPane;
|
private AnchorPane mainAnchorPane;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private AnchorPane gamesAnchorPane;
|
private AnchorPane gamesAnchorPane;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private AnchorPane settingsAnchorPane;
|
private AnchorPane settingsAnchorPane;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private AnchorPane smmdbAnchorPane;
|
private AnchorPane smmdbAnchorPane;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ScrollPane mainScrollPane;
|
private ScrollPane mainScrollPane;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ScrollPane settingsScrollPane;
|
private ScrollPane settingsScrollPane;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ScrollPane smmdbScrollPane;
|
private ScrollPane smmdbScrollPane;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ScrollPane smmdbImageViewScrollPane;
|
private ScrollPane smmdbImageViewScrollPane;
|
||||||
|
|
||||||
|
@ -210,7 +187,6 @@ public class MainWindowController {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private HBox topHBox;
|
private HBox topHBox;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private HBox bottomHBox;
|
private HBox bottomHBox;
|
||||||
|
|
||||||
|
@ -219,31 +195,22 @@ public class MainWindowController {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label helpLbl;
|
private Label helpLbl;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label cemu_UISettingsLbl;
|
private Label cemu_UISettingsLbl;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label cemuDirectoryLbl;
|
private Label cemuDirectoryLbl;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label romDirectoryLbl;
|
private Label romDirectoryLbl;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label mainColorLbl;
|
private Label mainColorLbl;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label languageLbl;
|
private Label languageLbl;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label updateLbl;
|
private Label updateLbl;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label branchLbl;
|
private Label branchLbl;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label cemuSettingsLbl;
|
private Label cemuSettingsLbl;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label licensesLbl;
|
private Label licensesLbl;
|
||||||
|
|
||||||
|
@ -251,17 +218,14 @@ public class MainWindowController {
|
||||||
private JFXTreeTableView<CourseTableDataType> courseTreeTable = new JFXTreeTableView<CourseTableDataType>();
|
private JFXTreeTableView<CourseTableDataType> courseTreeTable = new JFXTreeTableView<CourseTableDataType>();
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
TreeItem<CourseTableDataType> root = new TreeItem<>(new CourseTableDataType("", "", 0, 0));
|
private TreeItem<CourseTableDataType> root = new TreeItem<>(new CourseTableDataType("", "", 0, 0));
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXTreeTableColumn<CourseTableDataType, String> titleColumn = new JFXTreeTableColumn<>("title");
|
private JFXTreeTableColumn<CourseTableDataType, String> titleColumn = new JFXTreeTableColumn<>("title");
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXTreeTableColumn<CourseTableDataType, String> idColumn = new JFXTreeTableColumn<>("id");
|
private JFXTreeTableColumn<CourseTableDataType, String> idColumn = new JFXTreeTableColumn<>("id");
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXTreeTableColumn<CourseTableDataType, Integer> starsColumn = new JFXTreeTableColumn<>("stars");
|
private JFXTreeTableColumn<CourseTableDataType, Integer> starsColumn = new JFXTreeTableColumn<>("stars");
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXTreeTableColumn<CourseTableDataType, Integer> timeColumn = new JFXTreeTableColumn<>("time");
|
private JFXTreeTableColumn<CourseTableDataType, Integer> timeColumn = new JFXTreeTableColumn<>("time");
|
||||||
|
|
||||||
|
@ -293,8 +257,8 @@ public class MainWindowController {
|
||||||
private String selectedGameTitleID;
|
private String selectedGameTitleID;
|
||||||
private String selectedGameTitle;
|
private String selectedGameTitle;
|
||||||
private String id;
|
private String id;
|
||||||
private String version = "0.3.0";
|
private String version = "0.3.1";
|
||||||
private String buildNumber = "077";
|
private String buildNumber = "081";
|
||||||
private String versionName = "Purple Comet";
|
private String versionName = "Purple Comet";
|
||||||
private int xPos = -200;
|
private int xPos = -200;
|
||||||
private int yPos = 17;
|
private int yPos = 17;
|
||||||
|
@ -372,8 +336,8 @@ public class MainWindowController {
|
||||||
private String smmdbDownloadBtnLoading;
|
private String smmdbDownloadBtnLoading;
|
||||||
private String smmdbDownloadBtnDownload;
|
private String smmdbDownloadBtnDownload;
|
||||||
|
|
||||||
public void setMain(Main m) {
|
public MainWindowController(Main main) {
|
||||||
this.main = m;
|
this.main = main;
|
||||||
dbController = new DBController(main, this);
|
dbController = new DBController(main, this);
|
||||||
smmdbAPIController = new SmmdbAPIController();
|
smmdbAPIController = new SmmdbAPIController();
|
||||||
}
|
}
|
||||||
|
@ -382,7 +346,7 @@ public class MainWindowController {
|
||||||
* initialize the MainWindowController
|
* initialize the MainWindowController
|
||||||
* loadSettings, checkAutoUpdate, initUI and initActions
|
* loadSettings, checkAutoUpdate, initUI and initActions
|
||||||
*/
|
*/
|
||||||
void init() {
|
public void init() {
|
||||||
loadSettings();
|
loadSettings();
|
||||||
checkAutoUpdate();
|
checkAutoUpdate();
|
||||||
initUI();
|
initUI();
|
||||||
|
@ -721,7 +685,7 @@ public class MainWindowController {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
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) {
|
} catch (IOException | URISyntaxException e) {
|
||||||
LOGGER.error("An error ocoured while trying to open a Website.", e);
|
LOGGER.error("An error ocoured while trying to open a Website.", e);
|
||||||
}
|
}
|
||||||
|
@ -810,8 +774,8 @@ public class MainWindowController {
|
||||||
saveSettings();
|
saveSettings();
|
||||||
} else {
|
} else {
|
||||||
String bodyText = newValue + ": No such file or directory";
|
String bodyText = newValue + ": No such file or directory";
|
||||||
JFXInfoDialog fileErrorDialog = new JFXInfoDialog("Waring!", bodyText, dialogBtnStyle, 190, 150, main.getPane());
|
JFXInfoAlert fileErrorDialog = new JFXInfoAlert("Waring!", bodyText, dialogBtnStyle, main.getPrimaryStage());
|
||||||
fileErrorDialog.show();
|
fileErrorDialog.showAndWait();
|
||||||
LOGGER.warn(newValue + ": No such file or directory");
|
LOGGER.warn(newValue + ": No such file or directory");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -826,8 +790,8 @@ public class MainWindowController {
|
||||||
reloadRoms();
|
reloadRoms();
|
||||||
} else {
|
} else {
|
||||||
String bodyText = newValue + ": No such file or directory";
|
String bodyText = newValue + ": No such file or directory";
|
||||||
JFXInfoDialog fileErrorDialog = new JFXInfoDialog("Waring!", bodyText, dialogBtnStyle, 190, 150, main.getPane());
|
JFXInfoAlert fileErrorDialog = new JFXInfoAlert("Waring!", bodyText, dialogBtnStyle, main.getPrimaryStage());
|
||||||
fileErrorDialog.show();
|
fileErrorDialog.showAndWait();
|
||||||
LOGGER.warn(newValue + ": No such file or directory");
|
LOGGER.warn(newValue + ": No such file or directory");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -837,20 +801,21 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void detailsSlideoutBtnAction() {
|
private void detailsSlideoutBtnAction() {
|
||||||
playBtnSlideOut();
|
playBtnSlideOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void aboutBtnAction() {
|
private void aboutBtnAction() {
|
||||||
String bodyText = "cemu_UI by @Seil0 \nVersion: " + version + " (" + buildNumber + ") \"" + versionName + "\" \n"
|
String bodyText = "cemu_UI by @Seil0 \nVersion: " + version + " (" + buildNumber + ") \"" + versionName + "\" \n"
|
||||||
+ aboutBtnBodyText;
|
+ 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
|
@FXML
|
||||||
void settingsBtnAction() {
|
private void settingsBtnAction() {
|
||||||
if (smmdbTrue) {
|
if (smmdbTrue) {
|
||||||
smmdbAnchorPane.setVisible(false);
|
smmdbAnchorPane.setVisible(false);
|
||||||
smmdbTrue = false;
|
smmdbTrue = false;
|
||||||
|
@ -866,12 +831,12 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void reloadRomsBtnAction() throws IOException {
|
private void reloadRomsBtnAction() throws IOException {
|
||||||
reloadRoms();
|
reloadRoms();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void smmdbBtnAction() {
|
private void smmdbBtnAction() {
|
||||||
// show smmdbAnchorPane
|
// show smmdbAnchorPane
|
||||||
if (smmdbTrue) {
|
if (smmdbTrue) {
|
||||||
smmdbAnchorPane.setVisible(false);
|
smmdbAnchorPane.setVisible(false);
|
||||||
|
@ -910,7 +875,7 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void playBtnAction() throws InterruptedException, IOException {
|
private void playBtnAction() throws InterruptedException, IOException {
|
||||||
dbController.setLastPlayed(selectedGameTitleID);
|
dbController.setLastPlayed(selectedGameTitleID);
|
||||||
playGame = new playGame(this, dbController);
|
playGame = new playGame(this, dbController);
|
||||||
|
|
||||||
|
@ -918,17 +883,17 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void totalPlaytimeBtnAction() {
|
private void totalPlaytimeBtnAction() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void lastTimePlayedBtnAction() {
|
private void lastTimePlayedBtnAction() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void cemuTFBtnAction() {
|
private void cemuTFBtnAction() {
|
||||||
File cemuDirectory = directoryChooser.showDialog(main.getPrimaryStage());
|
File cemuDirectory = directoryChooser.showDialog(main.getPrimaryStage());
|
||||||
if (cemuDirectory != null) {
|
if (cemuDirectory != null) {
|
||||||
cemuTextField.setText(cemuDirectory.getAbsolutePath());
|
cemuTextField.setText(cemuDirectory.getAbsolutePath());
|
||||||
|
@ -936,7 +901,7 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void romTFBtnAction() {
|
private void romTFBtnAction() {
|
||||||
File romDirectory = directoryChooser.showDialog(main.getPrimaryStage());
|
File romDirectory = directoryChooser.showDialog(main.getPrimaryStage());
|
||||||
if (romDirectory != null) {
|
if (romDirectory != null) {
|
||||||
romTextField.setText(romDirectory.getAbsolutePath());
|
romTextField.setText(romDirectory.getAbsolutePath());
|
||||||
|
@ -944,7 +909,7 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void updateBtnAction() {
|
private void updateBtnAction() {
|
||||||
updateController = new UpdateController(this, buildNumber, useBeta);
|
updateController = new UpdateController(this, buildNumber, useBeta);
|
||||||
Thread updateThread = new Thread(updateController);
|
Thread updateThread = new Thread(updateController);
|
||||||
updateThread.setName("Updater");
|
updateThread.setName("Updater");
|
||||||
|
@ -952,7 +917,7 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void autoUpdateToggleBtnAction() {
|
private void autoUpdateToggleBtnAction() {
|
||||||
if (isAutoUpdate()) {
|
if (isAutoUpdate()) {
|
||||||
setAutoUpdate(false);
|
setAutoUpdate(false);
|
||||||
} else {
|
} else {
|
||||||
|
@ -962,12 +927,12 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void courseSearchTextFiledAction() {
|
private void courseSearchTextFiledAction() {
|
||||||
// not in use
|
// not in use
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void smmdbDownloadBtnAction() {
|
private void smmdbDownloadBtnAction() {
|
||||||
String downloadUrl = "http://smmdb.ddns.net/api/downloadcourse?id=" + id + "&type=zip";
|
String downloadUrl = "http://smmdb.ddns.net/api/downloadcourse?id=" + id + "&type=zip";
|
||||||
String downloadFileURL = getCemuPath() + "/" + id + ".zip"; // getCemuPath() + "/" + smmID + "/" + id + ".rar"
|
String downloadFileURL = getCemuPath() + "/" + id + ".zip"; // getCemuPath() + "/" + smmID + "/" + id + ".rar"
|
||||||
String outputFile = getCemuPath() + "/";
|
String outputFile = getCemuPath() + "/";
|
||||||
|
@ -1035,7 +1000,7 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void fullscreenToggleBtnAction() {
|
private void fullscreenToggleBtnAction() {
|
||||||
if (fullscreen) {
|
if (fullscreen) {
|
||||||
fullscreen = false;
|
fullscreen = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1045,7 +1010,7 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void cloudSyncToggleBtnAction() {
|
private void cloudSyncToggleBtnAction() {
|
||||||
if(cloudSync) {
|
if(cloudSync) {
|
||||||
cloudSync = false;
|
cloudSync = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1069,9 +1034,9 @@ public class MainWindowController {
|
||||||
cloudSyncToggleBtn.setSelected(false);
|
cloudSyncToggleBtn.setSelected(false);
|
||||||
|
|
||||||
// cloud sync init error dialog
|
// cloud sync init error dialog
|
||||||
JFXInfoDialog cloudSyncErrorDialog = new JFXInfoDialog(cloudSyncErrorHeadingText,
|
JFXInfoAlert cloudSyncErrorDialog = new JFXInfoAlert(cloudSyncErrorHeadingText,
|
||||||
cloudSyncErrorBodyText, dialogBtnStyle, 450, 170, main.getPane());
|
cloudSyncErrorBodyText, dialogBtnStyle, main.getPrimaryStage());
|
||||||
cloudSyncErrorDialog.show();
|
cloudSyncErrorDialog.showAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1095,13 +1060,13 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void colorPickerAction() {
|
private void colorPickerAction() {
|
||||||
editColor(colorPicker.getValue().toString());
|
editColor(colorPicker.getValue().toString());
|
||||||
applyColor();
|
applyColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void addBtnAction() {
|
private void addBtnAction() {
|
||||||
String headingText = addGameBtnHeadingText;
|
String headingText = addGameBtnHeadingText;
|
||||||
String bodyText = addGameBtnBodyText;
|
String bodyText = addGameBtnBodyText;
|
||||||
JFXEditGameDialog addGameDialog = new JFXEditGameDialog(headingText, bodyText, dialogBtnStyle, 450, 300, 0,
|
JFXEditGameDialog addGameDialog = new JFXEditGameDialog(headingText, bodyText, dialogBtnStyle, 450, 300, 0,
|
||||||
|
@ -1123,9 +1088,9 @@ public class MainWindowController {
|
||||||
LOGGER.info("No parameter set!");
|
LOGGER.info("No parameter set!");
|
||||||
|
|
||||||
//addGame error dialog
|
//addGame error dialog
|
||||||
JFXInfoDialog errorDialog = new JFXInfoDialog(addBtnReturnErrorHeadingText, addBtnReturnErrorBodyText,
|
JFXInfoAlert errorDialog = new JFXInfoAlert(addBtnReturnErrorHeadingText, addBtnReturnErrorBodyText,
|
||||||
dialogBtnStyle, 350, 170, main.getPane());
|
dialogBtnStyle, main.getPrimaryStage());
|
||||||
errorDialog.show();
|
errorDialog.showAndWait();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
File pictureCache = main.getPictureCache();
|
File pictureCache = main.getPictureCache();
|
||||||
|
@ -1591,6 +1556,7 @@ public class MainWindowController {
|
||||||
reloadRomsBtn.setGraphic(cached_white);
|
reloadRomsBtn.setGraphic(cached_white);
|
||||||
smmdbBtn.setGraphic(smmdb_white);
|
smmdbBtn.setGraphic(smmdb_white);
|
||||||
|
|
||||||
|
menuHam.getStyleClass().clear();
|
||||||
menuHam.getStyleClass().add("jfx-hamburgerW");
|
menuHam.getStyleClass().add("jfx-hamburgerW");
|
||||||
} else {
|
} else {
|
||||||
dialogBtnStyle = btnStyleBlack;
|
dialogBtnStyle = btnStyleBlack;
|
||||||
|
@ -1613,6 +1579,7 @@ public class MainWindowController {
|
||||||
reloadRomsBtn.setGraphic(cached_black);
|
reloadRomsBtn.setGraphic(cached_black);
|
||||||
smmdbBtn.setGraphic(smmdb_black);
|
smmdbBtn.setGraphic(smmdb_black);
|
||||||
|
|
||||||
|
menuHam.getStyleClass().clear();
|
||||||
menuHam.getStyleClass().add("jfx-hamburgerB");
|
menuHam.getStyleClass().add("jfx-hamburgerB");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ public class UpdateController implements Runnable {
|
||||||
FileUtils.copyInputStreamToFile(pmis, new File("cemu_UI_update.jar")); // download update
|
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.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
|
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
|
System.exit(0); // finishes itself
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
|
|
|
@ -117,8 +117,8 @@ public class JFXEditGameDialog {
|
||||||
// addGame error dialog
|
// addGame error dialog
|
||||||
String headingTextError = mwc.getBundle().getString("editGameDialogHeadingTextError");
|
String headingTextError = mwc.getBundle().getString("editGameDialogHeadingTextError");
|
||||||
String bodyTextError = mwc.getBundle().getString("editGameDialogBodyTextError");
|
String bodyTextError = mwc.getBundle().getString("editGameDialogBodyTextError");
|
||||||
JFXInfoDialog errorDialog = new JFXInfoDialog(headingTextError, bodyTextError, dialogBtnStyle, 350,170, pane);
|
JFXInfoAlert errorDialog = new JFXInfoAlert(headingTextError, bodyTextError, dialogBtnStyle, stage);
|
||||||
errorDialog.show();
|
errorDialog.showAndWait();
|
||||||
} else {
|
} else {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
|
@ -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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -20,66 +20,92 @@
|
||||||
*/
|
*/
|
||||||
package com.cemu_UI.uiElements;
|
package com.cemu_UI.uiElements;
|
||||||
|
|
||||||
|
import com.jfoenix.controls.JFXAlert;
|
||||||
import com.jfoenix.controls.JFXButton;
|
import com.jfoenix.controls.JFXButton;
|
||||||
import com.jfoenix.controls.JFXDialog;
|
|
||||||
import com.jfoenix.controls.JFXDialogLayout;
|
import com.jfoenix.controls.JFXDialogLayout;
|
||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.event.EventHandler;
|
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.scene.text.Text;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
public class JFXInfoDialog {
|
public class JFXInfoAlert {
|
||||||
|
|
||||||
private String headingText;
|
private String headingText;
|
||||||
private String bodyText;
|
private String bodyText;
|
||||||
private String dialogBtnStyle;
|
private String btnStyle;
|
||||||
private int dialogWidth;
|
private Stage stage;
|
||||||
private int dialogHeight;
|
|
||||||
private Pane pane;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new JFoenix Dialog to show some information
|
* Creates a new JFoenix Alert to show some information
|
||||||
* @param headingText Heading Text, just the heading
|
* @param headerText Heading text of the alert
|
||||||
* @param bodyText body Text, all other text belongs here
|
* @param bodyText Content text of the alert
|
||||||
* @param dialogBtnStyle Style of the okay button
|
* @param btnStyle Style of the okay button
|
||||||
* @param dialogWidth dialog width
|
* @param stage stage to which the dialog belongs
|
||||||
* @param dialogHeight dialog height
|
|
||||||
* @param pane pane to which the dialog belongs
|
|
||||||
*/
|
*/
|
||||||
public JFXInfoDialog(String headingText, String bodyText, String dialogBtnStyle, int dialogWidth, int dialogHeight, Pane pane) {
|
public JFXInfoAlert(String headingText, String bodyText, String btnStyle, Stage stage) {
|
||||||
this.headingText = headingText;
|
setHeadingText(headingText);
|
||||||
this.bodyText = bodyText;
|
setBodyText(bodyText);
|
||||||
this.dialogBtnStyle = dialogBtnStyle;
|
setBtnStyle(btnStyle);
|
||||||
this.dialogWidth = dialogWidth;
|
setStage(stage);
|
||||||
this.dialogHeight = dialogHeight;
|
|
||||||
this.pane = pane;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void show() {
|
public JFXInfoAlert() {
|
||||||
JFXDialogLayout content = new JFXDialogLayout();
|
// Auto-generated constructor stub
|
||||||
content.setHeading(new Text(headingText));
|
}
|
||||||
content.setBody(new Text(bodyText));
|
|
||||||
content.setPrefSize(dialogWidth, dialogHeight);
|
public void showAndWait( ) {
|
||||||
StackPane stackPane = new StackPane();
|
JFXAlert<Void> alert = new JFXAlert<>(stage);
|
||||||
stackPane.autosize();
|
|
||||||
JFXDialog dialog = new JFXDialog(stackPane, content, JFXDialog.DialogTransition.LEFT, true);
|
|
||||||
JFXButton button = new JFXButton("Okay");
|
JFXButton button = new JFXButton("Okay");
|
||||||
button.setOnAction(new EventHandler<ActionEvent>() {
|
button.setOnAction(new EventHandler<ActionEvent>() {
|
||||||
@Override
|
@Override
|
||||||
public void handle(ActionEvent event) {
|
public void handle(ActionEvent event) {
|
||||||
dialog.close();
|
alert.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
button.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED);
|
button.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED);
|
||||||
button.setPrefHeight(32);
|
button.setPrefHeight(32);
|
||||||
button.setStyle(dialogBtnStyle);
|
button.setStyle(btnStyle);
|
||||||
|
|
||||||
|
JFXDialogLayout content = new JFXDialogLayout();
|
||||||
content.setActions(button);
|
content.setActions(button);
|
||||||
pane.getChildren().add(stackPane);
|
content.setHeading(new Text(headingText));
|
||||||
AnchorPane.setTopAnchor(stackPane, (pane.getHeight() - content.getPrefHeight()) / 2);
|
content.setBody(new Text(bodyText));
|
||||||
AnchorPane.setLeftAnchor(stackPane, (pane.getWidth() - content.getPrefWidth()) / 2);
|
alert.setContent(content);
|
||||||
dialog.show();
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -18,7 +18,7 @@
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
<?import javafx.scene.text.TextFlow?>
|
<?import javafx.scene.text.TextFlow?>
|
||||||
|
|
||||||
<AnchorPane fx:id="mainAnchorPane" minHeight="405.0" minWidth="260.0" prefHeight="600.0" prefWidth="904.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.cemu_UI.application.MainWindowController">
|
<AnchorPane fx:id="mainAnchorPane" minHeight="405.0" minWidth="260.0" prefHeight="600.0" prefWidth="904.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<children>
|
<children>
|
||||||
<ScrollPane fx:id="mainScrollPane" fitToWidth="true" layoutY="38.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
|
<ScrollPane fx:id="mainScrollPane" fitToWidth="true" layoutY="38.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
|
||||||
<content>
|
<content>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#HomeFlix-Local_de_DE.properties geramn Local
|
#HomeFlix-Local_de_DE.properties DE-Deutsch Local
|
||||||
|
|
||||||
# Buttons
|
# Buttons
|
||||||
aboutBtn = \u00dcber
|
aboutBtn = \u00dcber
|
||||||
|
@ -46,7 +46,7 @@ licensesLblBodyText = cemu_UI ist lizensiert unter der GNU GPL 3.\n\nJFoenix, Ap
|
||||||
showLicenses = Lizenzen \u00f6ffnen
|
showLicenses = Lizenzen \u00f6ffnen
|
||||||
|
|
||||||
aboutBtnHeadingText = cemu_UI
|
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)
|
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!
|
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!
|
||||||
|
|
|
@ -46,7 +46,7 @@ licensesLblBodyText = cemu_UI is licensed under the terms of GNU GPL 3.\n\nJFoen
|
||||||
showLicenses = show licenses
|
showLicenses = show licenses
|
||||||
|
|
||||||
aboutBtnHeadingText = cemu_UI
|
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)
|
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!
|
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!
|
||||||
|
|
Loading…
Reference in New Issue