@ -57,6 +57,7 @@ import com.cemu_UI.controller.DBController;
import com.cemu_UI.controller.SmmdbAPIController ;
import com.cemu_UI.controller.UpdateController ;
import com.cemu_UI.datatypes.CourseTableDataType ;
import com.cemu_UI.datatypes.GlobalDataTypes.CloudService ;
import com.cemu_UI.datatypes.SmmdbApiDataType ;
import com.cemu_UI.datatypes.UIROMDataType ;
import com.cemu_UI.uiElements.JFXEditGameDialog ;
@ -109,130 +110,73 @@ import net.lingala.zip4j.exception.ZipException;
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 ;
@FXML
private JFXHamburger menuHam ;
@FXML
private JFXTextField cemuTextField ;
@FXML
private JFXTextField romTextField ;
@FXML
private JFXTextField courseSearchTextFiled ;
@FXML
private JFXTextField executeCommandTextFiled ;
@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 ;
@FXML private JFXHamburger menuHam ;
@FXML private JFXTextField cemuTextField ;
@FXML private JFXTextField romTextField ;
@FXML private JFXTextField courseSearchTextFiled ;
@FXML private JFXTextField executeCommandTextFiled ;
@FXML
private TextFlow smmdbTextFlow ;
@FXML private TextFlow smmdbTextFlow ;
@FXML
private JFXColorPicker colorPicker ;
@FXML private JFXColorPicker colorPicker ;
@FXML
private JFXToggleButton cloudSyncToggleBtn ;
@FXML
private JFXToggleButton autoUpdateToggleBtn ;
@FXML
private JFXToggleButton fullscreenToggleBtn ;
@FXML private JFXToggleButton cloudSyncToggleBtn ;
@FXML private JFXToggleButton autoUpdateToggleBtn ;
@FXML private JFXToggleButton fullscreenToggleBtn ;
@FXML
private ChoiceBox < String > languageChoisBox ;
@FXML
private ChoiceBox < String > branchChoisBox ;
@FXML private ChoiceBox < String > languageChoisBox ;
@FXML private ChoiceBox < String > branchChoisBox ;
@FXML
private AnchorPane mainAnchorPane ;
@FXML
private AnchorPane gamesAnchorPane ;
@FXML
private AnchorPane settingsAnchorPane ;
@FXML
private AnchorPane smmdbAnchorPane ;
@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 ;
@FXML private ScrollPane mainScrollPane ;
@FXML private ScrollPane settingsScrollPane ;
@FXML private ScrollPane smmdbScrollPane ;
@FXML private ScrollPane smmdbImageViewScrollPane ;
@FXML
private VBox sideMenuVBox ;
@FXML private VBox sideMenuVBox ;
@FXML
private HBox topHBox ;
@FXML
private HBox bottomHBox ;
@FXML private HBox topHBox ;
@FXML private HBox bottomHBox ;
@FXML
private ImageView smmdbImageView ;
@FXML private ImageView smmdbImageView ;
@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 ;
@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 ;
@FXML
private JFXTreeTableView < CourseTableDataType > courseTreeTable = new JFXTreeTableView < CourseTableDataType > ( ) ;
@FXML private JFXTreeTableView < CourseTableDataType > courseTreeTable = new JFXTreeTableView < CourseTableDataType > ( ) ;
@FXML
private TreeItem < CourseTableDataType > root = new TreeItem < > ( new CourseTableDataType ( "" , "" , 0 , 0 ) ) ;
@FXML private TreeItem < CourseTableDataType > root = new TreeItem < > ( new CourseTableDataType ( "" , "" , 0 , 0 ) ) ;
@FXML
private JFXTreeTableColumn < CourseTableDataType , String > titleColumn = new JFXTreeTableColumn < > ( "title" ) ;
@FXML
private JFXTreeTableColumn < CourseTableDataType , String > idColumn = new JFXTreeTableColumn < > ( "id" ) ;
@FXML
private JFXTreeTableColumn < CourseTableDataType , Integer > starsColumn = new JFXTreeTableColumn < > ( "stars" ) ;
@FXML
private JFXTreeTableColumn < CourseTableDataType , Integer > timeColumn = new JFXTreeTableColumn < > ( "time" ) ;
@SuppressWarnings ( "unused" )
private enum CloudService {
GoogleDrive , Dropbox
}
@FXML private JFXTreeTableColumn < CourseTableDataType , String > titleColumn = new JFXTreeTableColumn < > ( "title" ) ;
@FXML private JFXTreeTableColumn < CourseTableDataType , String > idColumn = new JFXTreeTableColumn < > ( "id" ) ;
@FXML private JFXTreeTableColumn < CourseTableDataType , Integer > starsColumn = new JFXTreeTableColumn < > ( "stars" ) ;
@FXML private JFXTreeTableColumn < CourseTableDataType , Integer > timeColumn = new JFXTreeTableColumn < > ( "time" ) ;
private Main main ;
private DBController dbController ;
@ -248,7 +192,7 @@ public class MainWindowController {
private boolean useBeta = false ;
private boolean fullscreen ;
private boolean cloudSync ;
private String cloudService = "" ; // set cloud provider (at the moment only GoogleDrive, Dropbox is planed)
private CloudService cloudService ;
private String cemuPath ;
private String romDirectoryPath ;
private String gameExecutePath ;
@ -257,8 +201,8 @@ public class MainWindowController {
private String selectedGameTitleID ;
private String selectedGameTitle ;
private String id ;
private String version = "0.3.1 " ;
private String buildNumber = "081 " ;
private String version = "0.3.2 " ;
private String buildNumber = "085 " ;
private String versionName = "Purple Comet" ;
private int xPos = - 200 ;
private int yPos = 17 ;
@ -1020,7 +964,7 @@ public class MainWindowController {
cloudSync = true ;
//TODO rework for other cloud services
// CloudService service = CloudService.GoogleDrive;
cloudService = "GoogleDrive" ;
cloudService = CloudService . GoogleDrive ;
// start cloud sync in new thread
Thread thread = new Thread ( new Runnable ( ) {
@ -1606,7 +1550,7 @@ public class MainWindowController {
if ( getCloudService ( ) = = null ) {
props . setProperty ( "cloudService" , "" ) ;
} else {
props . setProperty ( "cloudService" , getCloudService ( ) ) ;
props . setProperty ( "cloudService" , getCloudService ( ) . toString ( ) ) ;
}
props . setProperty ( "folderID" , main . getCloudController ( ) . getFolderID ( getCloudService ( ) ) ) ;
props . setProperty ( "lastLocalSync" , String . valueOf ( getLastLocalSync ( ) ) ) ;
@ -1689,10 +1633,19 @@ public class MainWindowController {
}
try {
setCloudService ( props . getProperty ( "cloudService" ) ) ;
switch ( props . getProperty ( "cloudService" ) ) {
case "GoogleDrive" :
setCloudService ( CloudService . GoogleDrive ) ;
break ;
case "Dropbox" :
setCloudService ( CloudService . Dropbox ) ;
break ;
default :
break ;
}
} catch ( Exception e ) {
LOGGER . error ( "could not load cloudSync" , e ) ;
setCloudService ( "" ) ;
setCloudService ( null ) ;
}
try {
@ -1920,11 +1873,11 @@ public class MainWindowController {
this . selectedGameTitleID = selectedGameTitleID ;
}
public String getCloudService ( ) {
public CloudService getCloudService ( ) {
return cloudService ;
}
public void setCloudService ( String cloudService ) {
public void setCloudService ( CloudService cloudService ) {
this . cloudService = cloudService ;
}