maven buildsystem
* maven is now used to build cemu_UI * cleaned up a lot of code for better overview
@ -19,7 +19,7 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package application;
|
||||
package com.cemu_UI.application;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
@ -33,6 +33,9 @@ import java.util.TimerTask;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.cemu_UI.controller.CloudController;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
@ -66,16 +69,22 @@ public class Main extends Application {
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) {
|
||||
this.primaryStage = primaryStage;
|
||||
cloudController = new CloudController(this);
|
||||
mainWindow();
|
||||
initActions();
|
||||
try {
|
||||
this.primaryStage = primaryStage;
|
||||
cloudController = new CloudController(mainWindowController);
|
||||
mainWindow();
|
||||
initActions();
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("ooooops",e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void mainWindow(){
|
||||
try {
|
||||
FXMLLoader loader = new FXMLLoader(Main.class.getResource("MainWindow.fxml"));
|
||||
pane = loader.load();
|
||||
FXMLLoader loader = new FXMLLoader();
|
||||
loader.setLocation(ClassLoader.getSystemResource("fxml/MainWindow.fxml"));
|
||||
pane = (AnchorPane) loader.load();
|
||||
// primaryStage.setResizable(false);
|
||||
primaryStage.setTitle("cemu_UI");
|
||||
// primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/resources/Homeflix_Icon_64x64.png"))); //adds application icon
|
||||
@ -100,7 +109,7 @@ public class Main extends Application {
|
||||
|
||||
//startup checks
|
||||
//check if client_secret.jason is present
|
||||
if (Main.class.getResourceAsStream("/resources/client_secret.json") == null) {
|
||||
if (Main.class.getResourceAsStream("/client_secret.json") == null) {
|
||||
LOGGER.error("client_secret is missing!!!!!");
|
||||
|
||||
Alert alert = new Alert(AlertType.ERROR);
|
||||
@ -160,7 +169,7 @@ public class Main extends Application {
|
||||
mainWindowController.addUIData();
|
||||
|
||||
scene = new Scene(pane); //create new scene, append pane to scene
|
||||
scene.getStylesheets().add(Main.class.getResource("MainWindows.css").toExternalForm());
|
||||
scene.getStylesheets().add(Main.class.getResource("/css/MainWindows.css").toExternalForm());
|
||||
primaryStage.setScene(scene); //append scene to stage
|
||||
primaryStage.show(); //show stage
|
||||
} catch (IOException e) {
|
@ -19,7 +19,7 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package application;
|
||||
package com.cemu_UI.application;
|
||||
|
||||
import java.awt.Desktop;
|
||||
import java.awt.Graphics2D;
|
||||
@ -51,8 +51,18 @@ import org.apache.commons.io.FileUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.cemu_UI.controller.SmmdbApiQuery;
|
||||
import com.cemu_UI.controller.UpdateController;
|
||||
import com.cemu_UI.controller.dbController;
|
||||
import com.cemu_UI.datatypes.CourseTableDataType;
|
||||
import com.cemu_UI.datatypes.SmmdbApiDataType;
|
||||
import com.cemu_UI.datatypes.UIROMDataType;
|
||||
import com.cemu_UI.uiElements.JFXInfoDialog;
|
||||
import com.cemu_UI.uiElements.JFXOkayCancelDialog;
|
||||
import com.jfoenix.controls.JFXButton;
|
||||
import com.jfoenix.controls.JFXColorPicker;
|
||||
import com.jfoenix.controls.JFXDialog;
|
||||
import com.jfoenix.controls.JFXDialogLayout;
|
||||
import com.jfoenix.controls.JFXHamburger;
|
||||
import com.jfoenix.controls.JFXTextField;
|
||||
import com.jfoenix.controls.JFXToggleButton;
|
||||
@ -60,11 +70,6 @@ import com.jfoenix.controls.JFXTreeTableColumn;
|
||||
import com.jfoenix.controls.JFXTreeTableView;
|
||||
import com.jfoenix.transitions.hamburger.HamburgerBackArrowBasicTransition;
|
||||
|
||||
import UIElements.JFXInfoDialog;
|
||||
import UIElements.JFXOkayCancelDialog;
|
||||
import datatypes.CourseTableDataType;
|
||||
import datatypes.SmmdbApiDataType;
|
||||
import datatypes.UIROMDataType;
|
||||
import javafx.animation.FadeTransition;
|
||||
import javafx.animation.ParallelTransition;
|
||||
import javafx.animation.TranslateTransition;
|
||||
@ -96,6 +101,7 @@ import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.paint.Paint;
|
||||
@ -270,7 +276,7 @@ public class MainWindowController {
|
||||
private String selectedGameTitle;
|
||||
private String id;
|
||||
private String version = "0.2.0";
|
||||
private String buildNumber = "047";
|
||||
private String buildNumber = "053";
|
||||
private String versionName = "Puzzle Plank Galaxy";
|
||||
private int xPos = -200;
|
||||
private int yPos = 17;
|
||||
@ -285,8 +291,8 @@ public class MainWindowController {
|
||||
private File dirLinux = new File(System.getProperty("user.home") + "/cemu_UI");
|
||||
private File configFileWin = new File(dirWin + "/config.xml");
|
||||
private File configFileLinux = new File(dirLinux + "/config.xml");
|
||||
File pictureCacheWin = new File(dirWin+"/picture_cache");
|
||||
File pictureCacheLinux = new File(dirLinux+"/picture_cache");
|
||||
private File pictureCacheWin = new File(dirWin+"/picture_cache");
|
||||
private File pictureCacheLinux = new File(dirLinux+"/picture_cache");
|
||||
private ObservableList<String> branches = FXCollections.observableArrayList("stable", "beta");
|
||||
private ObservableList<String> smmIDs = FXCollections.observableArrayList("fe31b7f2", "44fc5929"); //TODO add more IDs
|
||||
private ObservableList<UIROMDataType> games = FXCollections.observableArrayList();
|
||||
@ -304,17 +310,17 @@ public class MainWindowController {
|
||||
private ContextMenu gameContextMenu = new ContextMenu(edit, remove, update, addDLC);
|
||||
private Label lastGameLabel = new Label();
|
||||
|
||||
private ImageView add_circle_black = new ImageView(new Image("resources/icons/ic_add_circle_black_24dp_1x.png"));
|
||||
private ImageView info_black = new ImageView(new Image("resources/icons/ic_info_black_24dp_1x.png"));
|
||||
private ImageView settings_black = new ImageView(new Image("resources/icons/ic_settings_black_24dp_1x.png"));
|
||||
private ImageView cached_black = new ImageView(new Image("resources/icons/ic_cached_black_24dp_1x.png"));
|
||||
private ImageView smmdb_black = new ImageView(new Image("resources/icons/ic_get_app_black_24dp_1x.png"));
|
||||
private ImageView add_circle_white = new ImageView(new Image("resources/icons/ic_add_circle_white_24dp_1x.png"));
|
||||
private ImageView info_white = new ImageView(new Image("resources/icons/ic_info_white_24dp_1x.png"));
|
||||
private ImageView settings_white = new ImageView(new Image("resources/icons/ic_settings_white_24dp_1x.png"));
|
||||
private ImageView cached_white = new ImageView(new Image("resources/icons/ic_cached_white_24dp_1x.png"));
|
||||
private ImageView smmdb_white = new ImageView(new Image("resources/icons/ic_get_app_white_24dp_1x.png"));
|
||||
private Image close_black = new Image("resources/icons/close_black_2048x2048.png");
|
||||
private ImageView add_circle_black = new ImageView(new Image("icons/ic_add_circle_black_24dp_1x.png"));
|
||||
private ImageView info_black = new ImageView(new Image("icons/ic_info_black_24dp_1x.png"));
|
||||
private ImageView settings_black = new ImageView(new Image("icons/ic_settings_black_24dp_1x.png"));
|
||||
private ImageView cached_black = new ImageView(new Image("icons/ic_cached_black_24dp_1x.png"));
|
||||
private ImageView smmdb_black = new ImageView(new Image("icons/ic_get_app_black_24dp_1x.png"));
|
||||
private ImageView add_circle_white = new ImageView(new Image("icons/ic_add_circle_white_24dp_1x.png"));
|
||||
private ImageView info_white = new ImageView(new Image("icons/ic_info_white_24dp_1x.png"));
|
||||
private ImageView settings_white = new ImageView(new Image("icons/ic_settings_white_24dp_1x.png"));
|
||||
private ImageView cached_white = new ImageView(new Image("icons/ic_cached_white_24dp_1x.png"));
|
||||
private ImageView smmdb_white = new ImageView(new Image("icons/ic_get_app_white_24dp_1x.png"));
|
||||
private Image close_black = new Image("icons/close_black_2048x2048.png");
|
||||
|
||||
public void setMain(Main main) {
|
||||
this.main = main;
|
||||
@ -1089,18 +1095,37 @@ public class MainWindowController {
|
||||
LOGGER.info("No parameter set!");
|
||||
|
||||
//addGame error dialog
|
||||
String headingText = "Error while adding a new Game!";
|
||||
String bodyText = "There was some truble adding your game."
|
||||
+ "\nOne of the needed values was empty, please try again to add your game.";
|
||||
JFXInfoDialog addGameErrorDialog = new JFXInfoDialog(headingText, bodyText, dialogBtnStyle, 450, 170, main.pane);
|
||||
addGameErrorDialog.show();
|
||||
JFXDialogLayout content= new JFXDialogLayout();
|
||||
content.setHeading(new Text("Error while adding a new Game!"));
|
||||
content.setBody(new Text("There was some truble adding your game."
|
||||
+ "\nOne of the needed values was empty, please try again to add your game."));
|
||||
content.setPrefSize(450, 170);
|
||||
StackPane stackPane = new StackPane();
|
||||
stackPane.autosize();
|
||||
JFXDialog errorDialog =new JFXDialog(stackPane, content, JFXDialog.DialogTransition.LEFT, true);
|
||||
JFXButton button=new JFXButton("Okay");
|
||||
button.setOnAction(new EventHandler<ActionEvent>(){
|
||||
@Override
|
||||
public void handle(ActionEvent event){
|
||||
errorDialog.close();
|
||||
}
|
||||
});
|
||||
button.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED);
|
||||
button.setPrefHeight(32);
|
||||
button.setStyle(dialogBtnStyle);
|
||||
content.setActions(button);
|
||||
main.pane.getChildren().add(stackPane);
|
||||
AnchorPane.setTopAnchor(stackPane, (main.pane.getHeight()-content.getPrefHeight())/2);
|
||||
AnchorPane.setLeftAnchor(stackPane, (main.pane.getWidth()-content.getPrefWidth())/2);
|
||||
errorDialog.show();
|
||||
|
||||
} else {
|
||||
coverName = new File(coverPath).getName();
|
||||
try {
|
||||
if (System.getProperty("os.name").equals("Linux")) {
|
||||
pictureCache = pictureCacheLinux;
|
||||
pictureCache = getPictureCacheLinux();
|
||||
} else {
|
||||
pictureCache = pictureCacheWin;
|
||||
pictureCache = getPictureCacheWin();
|
||||
}
|
||||
|
||||
BufferedImage originalImage = ImageIO.read(new File(coverPath)); //load cover
|
||||
@ -1129,7 +1154,7 @@ public class MainWindowController {
|
||||
* @param romPath : path to ROM file (.rpx)
|
||||
* @param titleID : ROM ID
|
||||
*/
|
||||
void addGame(String title, String coverPath, String romPath, String titleID){
|
||||
public void addGame(String title, String coverPath, String romPath, String titleID){
|
||||
VBox VBox = new VBox();
|
||||
Label gameTitleLabel = new Label();
|
||||
JFXButton gameBtn = new JFXButton();
|
||||
@ -1495,7 +1520,7 @@ public class MainWindowController {
|
||||
}
|
||||
}
|
||||
|
||||
void saveSettings(){
|
||||
public void saveSettings(){
|
||||
LOGGER.info("saving Settings ...");
|
||||
OutputStream outputStream; //new output-stream
|
||||
try {
|
||||
@ -1761,6 +1786,22 @@ public class MainWindowController {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public File getPictureCacheLinux() {
|
||||
return pictureCacheLinux;
|
||||
}
|
||||
|
||||
public void setPictureCacheLinux(File pictureCacheLinux) {
|
||||
this.pictureCacheLinux = pictureCacheLinux;
|
||||
}
|
||||
|
||||
public File getPictureCacheWin() {
|
||||
return pictureCacheWin;
|
||||
}
|
||||
|
||||
public void setPictureCacheWin(File pictureCacheWin) {
|
||||
this.pictureCacheWin = pictureCacheWin;
|
||||
}
|
||||
|
||||
public int getxPos() {
|
||||
return xPos;
|
||||
}
|
@ -19,13 +19,15 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package application;
|
||||
package com.cemu_UI.application;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.cemu_UI.controller.dbController;
|
||||
|
||||
import javafx.application.Platform;
|
||||
|
||||
public class playGame extends Thread{
|
||||
@ -34,7 +36,7 @@ public class playGame extends Thread{
|
||||
dbController dbController;
|
||||
private static final Logger LOGGER = LogManager.getLogger(playGame.class.getName());
|
||||
|
||||
public playGame(MainWindowController m, dbController db){
|
||||
public playGame(MainWindowController m, com.cemu_UI.controller.dbController db){
|
||||
mainWindowController = m;
|
||||
dbController = db;
|
||||
}
|
@ -19,7 +19,7 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package application;
|
||||
package com.cemu_UI.controller;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -27,20 +27,22 @@ import java.io.IOException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import cloudControllerInstances.GoogleDriveController;
|
||||
import com.cemu_UI.application.MainWindowController;
|
||||
import com.cemu_UI.vendorCloudController.GoogleDriveController;
|
||||
|
||||
import javafx.application.Platform;
|
||||
|
||||
public class CloudController {
|
||||
|
||||
public CloudController(Main ma) {
|
||||
main = ma;
|
||||
public CloudController(MainWindowController mwc) {
|
||||
this.mwc = mwc;
|
||||
}
|
||||
|
||||
private Main main;
|
||||
private MainWindowController mwc;
|
||||
private GoogleDriveController googleDriveController = new GoogleDriveController();
|
||||
private static final Logger LOGGER = LogManager.getLogger(CloudController.class.getName());
|
||||
|
||||
boolean initializeConnection(String cloudService, String cemuDirectory) {
|
||||
public boolean initializeConnection(String cloudService, String cemuDirectory) {
|
||||
boolean success = false;
|
||||
LOGGER.info("sartting cloud initialisation ...");
|
||||
|
||||
@ -62,23 +64,23 @@ public class CloudController {
|
||||
return success;
|
||||
}
|
||||
|
||||
void stratupCheck(String cloudService, String cemuDirectory) {
|
||||
public void stratupCheck(String cloudService, String cemuDirectory) {
|
||||
if(cloudService.equals("GoogleDrive")) {
|
||||
LOGGER.info("starting startup check google drive ...");
|
||||
try {
|
||||
if (!googleDriveController.checkFolder()) {
|
||||
googleDriveController.creatFolder();
|
||||
main.mainWindowController.saveSettings();
|
||||
mwc.saveSettings();
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Platform.runLater(() -> {
|
||||
main.mainWindowController.getPlayBtn().setText("syncing...");
|
||||
mwc.getPlayBtn().setText("syncing...");
|
||||
});
|
||||
googleDriveController.uploadAllFiles();
|
||||
Platform.runLater(() -> {
|
||||
main.mainWindowController.getPlayBtn().setText("play");
|
||||
mwc.getPlayBtn().setText("play");
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -97,14 +99,14 @@ public class CloudController {
|
||||
|
||||
|
||||
|
||||
void sync(String cloudService, String cemuDirectory) {
|
||||
public void sync(String cloudService, String cemuDirectory) {
|
||||
|
||||
//running sync in a new thread, instead of blocking the main thread
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Platform.runLater(() -> {
|
||||
main.mainWindowController.getPlayBtn().setText("syncing...");
|
||||
mwc.getPlayBtn().setText("syncing...");
|
||||
});
|
||||
LOGGER.info("starting synchronization in new thread ...");
|
||||
|
||||
@ -119,9 +121,9 @@ public class CloudController {
|
||||
|
||||
}
|
||||
Platform.runLater(() -> {
|
||||
main.mainWindowController.getPlayBtn().setText("play");
|
||||
mwc.getPlayBtn().setText("play");
|
||||
});
|
||||
main.mainWindowController.saveSettings();
|
||||
mwc.saveSettings();
|
||||
LOGGER.info("synchronization successful!");
|
||||
}
|
||||
});
|
@ -19,7 +19,7 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package application;
|
||||
package com.cemu_UI.controller;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
@ -30,12 +30,11 @@ import java.util.ArrayList;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.cemu_UI.datatypes.SmmdbApiDataType;
|
||||
import com.eclipsesource.json.Json;
|
||||
import com.eclipsesource.json.JsonArray;
|
||||
import com.eclipsesource.json.JsonValue;
|
||||
|
||||
import datatypes.SmmdbApiDataType;
|
||||
|
||||
public class SmmdbApiQuery {
|
||||
|
||||
private String URL = "https://smmdb.ddns.net/api/getcourses?format=json";
|
@ -19,7 +19,7 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package application;
|
||||
package com.cemu_UI.controller;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
@ -27,6 +27,7 @@ import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
|
||||
import javax.swing.ProgressMonitor;
|
||||
import javax.swing.ProgressMonitorInputStream;
|
||||
|
||||
@ -34,6 +35,7 @@ import org.apache.commons.io.FileUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.cemu_UI.application.MainWindowController;
|
||||
import com.eclipsesource.json.Json;
|
||||
import com.eclipsesource.json.JsonArray;
|
||||
import com.eclipsesource.json.JsonObject;
|
@ -19,7 +19,7 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package application;
|
||||
package com.cemu_UI.controller;
|
||||
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
@ -45,6 +45,8 @@ import org.apache.logging.log4j.Logger;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import com.cemu_UI.application.MainWindowController;
|
||||
|
||||
public class dbController {
|
||||
|
||||
public dbController(MainWindowController m) {
|
||||
@ -134,7 +136,7 @@ public class dbController {
|
||||
}
|
||||
}
|
||||
|
||||
void addRom(String title, String coverPath, String romPath, String titleID, String productCode, String region, String lastPlayed, String timePlayed) throws SQLException{
|
||||
public void addRom(String title, String coverPath, String romPath, String titleID, String productCode, String region, String lastPlayed, String timePlayed) throws SQLException{
|
||||
Statement stmt = connection.createStatement();
|
||||
stmt.executeUpdate("insert into local_roms values ('"+title+"','"+coverPath+"','"+romPath+"','"+titleID+"',"
|
||||
+ "'"+productCode+"','"+region+"','"+lastPlayed+"','"+timePlayed+"')");
|
||||
@ -143,7 +145,7 @@ public class dbController {
|
||||
LOGGER.info("added \""+title+"\" to ROM database");
|
||||
}
|
||||
|
||||
void removeRom(String titleID) throws SQLException{
|
||||
public void removeRom(String titleID) throws SQLException{
|
||||
Statement stmt = connection.createStatement();
|
||||
stmt.executeUpdate("delete from local_roms where titleID = '"+titleID+"'");
|
||||
connection.commit();
|
||||
@ -168,7 +170,7 @@ public class dbController {
|
||||
}
|
||||
|
||||
//load one single ROM after manual adding into the mainWindowController
|
||||
void loadSingleRom(String titleID){
|
||||
public void loadSingleRom(String titleID){
|
||||
LOGGER.info("loading a single ROM (ID: "+titleID+") into the mainWindowController ...");
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
@ -184,7 +186,7 @@ public class dbController {
|
||||
}
|
||||
|
||||
//get all files with .rpx TODO add other formats
|
||||
void loadRomDirectory(String directory){
|
||||
public void loadRomDirectory(String directory){
|
||||
File dir = new File(directory);
|
||||
File appFile;
|
||||
String[] extensions = new String[] { "rpx", "jsp" };
|
||||
@ -192,9 +194,9 @@ public class dbController {
|
||||
String coverPath;
|
||||
|
||||
if(System.getProperty("os.name").equals("Linux")){
|
||||
pictureCache = mainWindowController.pictureCacheLinux;
|
||||
pictureCache = mainWindowController.getPictureCacheLinux();
|
||||
}else{
|
||||
pictureCache = mainWindowController.pictureCacheWin;
|
||||
pictureCache = mainWindowController.getPictureCacheWin();
|
||||
}
|
||||
|
||||
try {
|
||||
@ -272,7 +274,7 @@ public class dbController {
|
||||
* @param titleID Title-ID of the Game
|
||||
* @return title, coverPath, romPath, titleID (in this order)
|
||||
*/
|
||||
String[] getGameInfo(String titleID){
|
||||
public String[] getGameInfo(String titleID){
|
||||
String[] gameInfo = new String[4];
|
||||
LOGGER.info("getting game info for titleID: "+titleID+" ...");
|
||||
try {
|
||||
@ -292,7 +294,7 @@ public class dbController {
|
||||
return gameInfo;
|
||||
}
|
||||
|
||||
void setGameInfo(String title, String titleID, String romPath, String coverPath){
|
||||
public void setGameInfo(String title, String titleID, String romPath, String coverPath){
|
||||
LOGGER.info("setting game info for titleID: "+titleID+" ...");
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
@ -305,7 +307,7 @@ public class dbController {
|
||||
}
|
||||
}
|
||||
|
||||
void setLastPlayed(String titleID){
|
||||
public void setLastPlayed(String titleID){
|
||||
try{
|
||||
Statement stmt = connection.createStatement();
|
||||
stmt.executeUpdate("UPDATE local_roms SET lastPlayed=date('now') WHERE titleID = '"+titleID+"';");
|
||||
@ -316,7 +318,7 @@ public class dbController {
|
||||
}
|
||||
}
|
||||
|
||||
String getLastPlayed(String titleID){
|
||||
public String getLastPlayed(String titleID){
|
||||
String lastPlayed = null;
|
||||
try{
|
||||
Statement stmt = connection.createStatement();
|
||||
@ -330,7 +332,7 @@ public class dbController {
|
||||
return lastPlayed;
|
||||
}
|
||||
|
||||
void setTotalPlaytime(String timePlayed, String titleID){
|
||||
public void setTotalPlaytime(String timePlayed, String titleID){
|
||||
try{
|
||||
Statement stmt = connection.createStatement();
|
||||
stmt.executeUpdate("UPDATE local_roms SET timePlayed='"+timePlayed+"' WHERE titleID = '"+titleID+"';");
|
||||
@ -342,7 +344,7 @@ public class dbController {
|
||||
}
|
||||
}
|
||||
|
||||
String getTotalPlaytime(String titleID){
|
||||
public String getTotalPlaytime(String titleID){
|
||||
String timePlayed = null;
|
||||
try{
|
||||
Statement stmt = connection.createStatement();
|
@ -19,7 +19,7 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package datatypes;
|
||||
package com.cemu_UI.datatypes;
|
||||
|
||||
import com.jfoenix.controls.datamodels.treetable.RecursiveTreeObject;
|
||||
|
@ -19,7 +19,7 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package datatypes;
|
||||
package com.cemu_UI.datatypes;
|
||||
|
||||
import javafx.beans.property.IntegerProperty;
|
||||
import javafx.beans.property.SimpleIntegerProperty;
|
@ -19,7 +19,7 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package datatypes;
|
||||
package com.cemu_UI.datatypes;
|
||||
|
||||
import com.jfoenix.controls.JFXButton;
|
||||
|
@ -19,7 +19,7 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package UIElements;
|
||||
package com.cemu_UI.uiElements;
|
||||
|
||||
import com.jfoenix.controls.JFXButton;
|
||||
import com.jfoenix.controls.JFXDialog;
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package UIElements;
|
||||
package com.cemu_UI.uiElements;
|
||||
|
||||
import com.jfoenix.controls.JFXButton;
|
||||
import com.jfoenix.controls.JFXDialog;
|
@ -19,7 +19,7 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package cloudControllerInstances;
|
||||
package com.cemu_UI.vendorCloudController;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
@ -101,7 +101,7 @@ public class GoogleDriveController {
|
||||
*/
|
||||
public Credential authorize() throws IOException {
|
||||
// Load client secrets.
|
||||
InputStream in = getClass().getClassLoader().getResourceAsStream("resources/client_secret.json");
|
||||
InputStream in = getClass().getClassLoader().getResourceAsStream("client_secret.json");
|
||||
GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));
|
||||
|
||||
//FIXME Linux fails to open a new browser window, application crashes, maybe a kde only bug
|
@ -17,7 +17,7 @@
|
||||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.scene.text.TextFlow?>
|
||||
|
||||
<AnchorPane fx:id="mainAnchorPane" prefHeight="600.0" prefWidth="904.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.MainWindowController">
|
||||
<AnchorPane fx:id="mainAnchorPane" prefHeight="600.0" prefWidth="904.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.cemu_UI.application.MainWindowController">
|
||||
<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">
|
||||
<content>
|
||||
@ -29,7 +29,7 @@
|
||||
</ScrollPane>
|
||||
<HBox fx:id="topHBox" prefHeight="38.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<JFXHamburger fx:id="menuHam" prefHeight="38.0" prefWidth="38.0" stylesheets="@MainWindows.css" />
|
||||
<JFXHamburger fx:id="menuHam" prefHeight="38.0" prefWidth="38.0" stylesheets="@../css/MainWindows.css" />
|
||||
</children>
|
||||
</HBox>
|
||||
<VBox fx:id="sideMenuVBox" layoutY="32.0" prefHeight="568.0" prefWidth="175.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="38.0">
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 232 B |
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 322 B |
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 326 B |