added a update section in the settings
* added "check now!" button (not working for now) * added a toggle button for auto updates (not working for now) * all labels used in the settings are now accessable from the mwc (preparation for supporting more languages)
This commit is contained in:
@ -16,9 +16,9 @@
|
||||
<?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.111" 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="application.MainWindowController">
|
||||
<children>
|
||||
<ScrollPane fx:id="scrollPaneMain" 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>
|
||||
<AnchorPane fx:id="gamesAnchorPane">
|
||||
<padding>
|
||||
@ -60,31 +60,38 @@
|
||||
</JFXButton>
|
||||
</children>
|
||||
</VBox>
|
||||
<!-- space between settings sections 35px, between sections elements (label + element) 20px, between label and element 3px(or more) -->
|
||||
<AnchorPane fx:id="settingsAnchorPane" layoutX="38.0" layoutY="27.0" style="-fx-background-color: white;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="175.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
|
||||
<children>
|
||||
<Label layoutX="22.0" layoutY="59.0" text="Cemu Directory" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="59.0" />
|
||||
<JFXTextField fx:id="cemuTextField" layoutX="18.0" layoutY="83.0" maxWidth="305.0" minWidth="305.0" onAction="#cemuTextFieldAction" prefHeight="32.0" prefWidth="305.0" promptText="cemu directory" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="79.0" />
|
||||
<JFXTextField fx:id="romTextField" layoutX="18.0" layoutY="159.0" maxWidth="305.0" minWidth="305.0" onAction="#romTextFieldAction" prefHeight="32.0" prefWidth="305.0" promptText="rom directory" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="151.0" />
|
||||
<JFXButton fx:id="romTFBtn" layoutX="337.0" layoutY="159.0" onAction="#romTFBtnAction" prefHeight="32.0" prefWidth="108.0" text="choose directory" AnchorPane.leftAnchor="333.0" AnchorPane.topAnchor="151.0" />
|
||||
<JFXButton fx:id="cemuTFBtn" layoutX="333.0" layoutY="79.0" onAction="#cemuTFBtnAction" prefHeight="32.0" prefWidth="108.0" text="choose directory" AnchorPane.leftAnchor="333.0" AnchorPane.topAnchor="79.0" />
|
||||
<JFXColorPicker fx:id="colorPicker" layoutX="22.0" layoutY="235.0" onAction="#colorPickerAction" AnchorPane.leftAnchor="16.0" AnchorPane.topAnchor="227.0" />
|
||||
<JFXToggleButton fx:id="fullscreenToggleBtn" layoutX="14.0" layoutY="391.0" onAction="#fullscreenToggleBtnAction" text="start game in fullscreen" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="390.0" />
|
||||
<Label layoutX="22.0" layoutY="135.0" text="Rom Directory" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="131.0" />
|
||||
<Label layoutX="22.0" layoutY="211.0" text="main Color" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="203.0" />
|
||||
<Label layoutX="14.0" layoutY="371.0" text="Cemu Settings" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="350.0">
|
||||
<font>
|
||||
<Font name="System Bold" size="14.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="22.0" layoutY="14.0" text="cemu_UI Settings" AnchorPane.leftAnchor="18.0" AnchorPane.topAnchor="14.0">
|
||||
<font>
|
||||
<Font name="System Bold" size="14.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<JFXToggleButton fx:id="cloudSyncToggleBtn" layoutX="14.0" layoutY="264.0" onAction="#cloudSyncToggleBtnAction" text="cloud savegames (Google Drive)" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="267.0" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<ScrollPane fx:id="settingsScrollPane" style="-fx-background: white;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="175.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
|
||||
<content>
|
||||
<!-- space between settings sections 35px, between sections elements (label + element) 20px, between label and element 3px(or more) -->
|
||||
<AnchorPane fx:id="settingsAnchorPane" prefHeight="562.0" prefWidth="511.0" style="-fx-background-color: white;">
|
||||
<children>
|
||||
<Label fx:id="cemuDirectoryLbl" layoutX="10.0" layoutY="39.0" text="Cemu Directory" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="39.0" />
|
||||
<JFXTextField fx:id="cemuTextField" layoutX="10.0" layoutY="59.0" maxWidth="305.0" minWidth="305.0" onAction="#cemuTextFieldAction" prefHeight="32.0" prefWidth="305.0" promptText="cemu directory" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="59.0" />
|
||||
<JFXTextField fx:id="romTextField" layoutX="10.0" layoutY="131.0" maxWidth="305.0" minWidth="305.0" onAction="#romTextFieldAction" prefHeight="32.0" prefWidth="305.0" promptText="rom directory" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="131.0" />
|
||||
<JFXButton fx:id="romTFBtn" layoutX="329.0" layoutY="131.0" onAction="#romTFBtnAction" prefHeight="32.0" text="choose directory" AnchorPane.leftAnchor="329.0" AnchorPane.topAnchor="131.0" />
|
||||
<JFXButton fx:id="cemuTFBtn" layoutX="329.0" layoutY="59.0" onAction="#cemuTFBtnAction" prefHeight="32.0" text="choose directory" AnchorPane.leftAnchor="329.0" AnchorPane.topAnchor="59.0" />
|
||||
<JFXColorPicker fx:id="colorPicker" layoutX="12.0" layoutY="207.0" onAction="#colorPickerAction" AnchorPane.leftAnchor="12.0" AnchorPane.topAnchor="207.0" />
|
||||
<JFXToggleButton fx:id="fullscreenToggleBtn" layoutX="16.0" layoutY="488.0" onAction="#fullscreenToggleBtnAction" text="start game in fullscreen" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="488.0" />
|
||||
<Label fx:id="romDirectoryLbl" layoutX="10.0" layoutY="111.0" text="Rom Directory" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="111.0" />
|
||||
<Label fx:id="mainColorLbl" layoutX="10.0" layoutY="183.0" text="main Color" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="183.0" />
|
||||
<Label fx:id="cemuSettingsLbl" layoutX="16.0" layoutY="450.0" text="Cemu Settings" AnchorPane.leftAnchor="16.0" AnchorPane.topAnchor="465.0">
|
||||
<font>
|
||||
<Font name="System Bold" size="14.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label fx:id="cemu_UISettingsLbl" layoutX="22.0" layoutY="14.0" text="cemu_UI Settings" AnchorPane.leftAnchor="18.0" AnchorPane.topAnchor="14.0">
|
||||
<font>
|
||||
<Font name="System Bold" size="14.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<JFXToggleButton fx:id="cloudSyncToggleBtn" layoutX="10.0" layoutY="247.0" onAction="#cloudSyncToggleBtnAction" text="cloud savegames (Google Drive)" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="247.0" />
|
||||
<Label fx:id="updateLbl" layoutX="10.0" layoutY="315.0" text="Updates" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="315.0" />
|
||||
<JFXButton fx:id="updateBtn" layoutX="14.0" layoutY="335.0" onAction="#updateBtnAction" prefHeight="32.0" prefWidth="111.0" text="check now!" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="335.0" />
|
||||
<JFXToggleButton fx:id="autoUpdateToggleBtn" layoutX="10.0" layoutY="372.0" onAction="#autoUpdateToggleBtnAction" text="check for updates on startup" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="372.0" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
</ScrollPane>
|
||||
<AnchorPane fx:id="smmdbAnchorPane" style="-fx-background-color: white;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="175.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
|
||||
<children>
|
||||
<JFXTreeTableView fx:id="courseTreeTable" layoutX="14.0" layoutY="14.0" prefHeight="537.0" prefWidth="405.0" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="14.0" />
|
||||
|
@ -127,6 +127,9 @@ public class MainWindowController {
|
||||
@FXML
|
||||
private JFXButton romTFBtn;
|
||||
|
||||
@FXML
|
||||
private JFXButton updateBtn;
|
||||
|
||||
@FXML
|
||||
private JFXButton smmdbDownloadBtn;
|
||||
|
||||
@ -152,14 +155,23 @@ public class MainWindowController {
|
||||
private TextFlow smmdbTextFlow;
|
||||
|
||||
@FXML
|
||||
private JFXColorPicker colorPicker;
|
||||
|
||||
@FXML
|
||||
private JFXToggleButton fullscreenToggleBtn;
|
||||
private JFXColorPicker colorPicker;
|
||||
|
||||
@FXML
|
||||
private JFXToggleButton cloudSyncToggleBtn;
|
||||
|
||||
@FXML
|
||||
private JFXToggleButton autoUpdateToggleBtn;
|
||||
|
||||
@FXML
|
||||
private JFXToggleButton fullscreenToggleBtn;
|
||||
|
||||
@FXML
|
||||
private AnchorPane mainAnchorPane;
|
||||
|
||||
@FXML
|
||||
private AnchorPane gamesAnchorPane;
|
||||
|
||||
@FXML
|
||||
private AnchorPane settingsAnchorPane;
|
||||
|
||||
@ -167,13 +179,10 @@ public class MainWindowController {
|
||||
private AnchorPane smmdbAnchorPane;
|
||||
|
||||
@FXML
|
||||
private AnchorPane gamesAnchorPane;
|
||||
private ScrollPane mainScrollPane;
|
||||
|
||||
@FXML
|
||||
private AnchorPane mainAnchorPane;
|
||||
|
||||
@FXML
|
||||
private ScrollPane scrollPaneMain;
|
||||
private ScrollPane settingsScrollPane;
|
||||
|
||||
@FXML
|
||||
private ScrollPane smmdbScrollPane;
|
||||
@ -190,6 +199,24 @@ public class MainWindowController {
|
||||
@FXML
|
||||
private Label helpLabel;
|
||||
|
||||
@FXML
|
||||
private Label cemu_UISettingsLbl;
|
||||
|
||||
@FXML
|
||||
private Label cemuDirectoryLbl;
|
||||
|
||||
@FXML
|
||||
private Label romDirectoryLbl;
|
||||
|
||||
@FXML
|
||||
private Label mainColorLbl;
|
||||
|
||||
@FXML
|
||||
private Label updateLbl;
|
||||
|
||||
@FXML
|
||||
private Label cemuSettingsLbl;
|
||||
|
||||
|
||||
@FXML
|
||||
private JFXTreeTableView<CourseTableDataType> courseTreeTable = new JFXTreeTableView<CourseTableDataType>();
|
||||
@ -341,7 +368,7 @@ public class MainWindowController {
|
||||
menuTrue = true;
|
||||
}
|
||||
if (settingsTrue) {
|
||||
settingsAnchorPane.setVisible(false);
|
||||
settingsScrollPane.setVisible(false);
|
||||
// setPath(tfPath.getText());
|
||||
saveSettings();
|
||||
settingsTrue = false;
|
||||
@ -619,11 +646,11 @@ public class MainWindowController {
|
||||
smmdbTrue = false;
|
||||
}
|
||||
if (settingsTrue) {
|
||||
settingsAnchorPane.setVisible(false);
|
||||
settingsScrollPane.setVisible(false);
|
||||
settingsTrue = false;
|
||||
saveSettings();
|
||||
} else {
|
||||
settingsAnchorPane.setVisible(true);
|
||||
settingsScrollPane.setVisible(true);
|
||||
settingsTrue = true;
|
||||
}
|
||||
}
|
||||
@ -714,6 +741,16 @@ public class MainWindowController {
|
||||
}
|
||||
}
|
||||
|
||||
@FXML
|
||||
void updateBtnAction(ActionEvent event) {
|
||||
// TODO implement and call update method
|
||||
}
|
||||
|
||||
@FXML
|
||||
void autoUpdateToggleBtnAction(ActionEvent event) {
|
||||
// TODO implement auto update function
|
||||
}
|
||||
|
||||
@FXML
|
||||
void smmdbDownloadBtnAction(ActionEvent event){
|
||||
String downloadUrl = "http://smmdb.ddns.net/api/downloadcourse?id=" + id + "&type=zip";
|
||||
@ -1239,8 +1276,8 @@ public class MainWindowController {
|
||||
xPosHelper++;
|
||||
}
|
||||
|
||||
System.out.println("Breit: " + mainAnchorPane.getPrefWidth());
|
||||
System.out.println("Breit2: " + mainAnchorPane.getWidth());
|
||||
// System.out.println("Breit: " + mainAnchorPane.getPrefWidth());
|
||||
// System.out.println("Breit2: " + mainAnchorPane.getWidth());
|
||||
// System.out.println("xPosHelper: " + xPosHelper);
|
||||
// System.out.println("yPos: " + yPos);
|
||||
// System.out.println("xPos: " + xPos);
|
||||
@ -1269,9 +1306,10 @@ public class MainWindowController {
|
||||
playBtn.setStyle("-fx-text-fill: WHITE; -fx-font-family: Roboto Medium;");
|
||||
cemuTFBtn.setStyle(btnStyleWhite);
|
||||
romTFBtn.setStyle(btnStyleWhite);
|
||||
updateBtn.setStyle(btnStyleWhite);
|
||||
smmdbDownloadBtn.setStyle(btnStyleWhite);
|
||||
playBtn.setStyle(btnStyleWhite);
|
||||
|
||||
|
||||
aboutBtn.setGraphic(info_white);
|
||||
settingsBtn.setGraphic(settings_white);
|
||||
addBtn.setGraphic(add_circle_white);
|
||||
@ -1290,6 +1328,7 @@ public class MainWindowController {
|
||||
playBtn.setStyle("-fx-text-fill: BLACK; -fx-font-family: Roboto Medium;");
|
||||
cemuTFBtn.setStyle(btnStyleBlack);
|
||||
romTFBtn.setStyle(btnStyleBlack);
|
||||
updateBtn.setStyle(btnStyleBlack);
|
||||
smmdbDownloadBtn.setStyle(btnStyleBlack);
|
||||
playBtn.setStyle(btnStyleBlack);
|
||||
|
||||
|
Reference in New Issue
Block a user