mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-09 07:20:04 -04:00
Even more GUI improvements
Update design to new "standard"
This commit is contained in:
parent
31f1ff6639
commit
e9975c6544
@ -20,6 +20,7 @@ import java.io.File;
|
||||
|
||||
public class StaticConfiguration {
|
||||
public static final boolean DEBUG_MODE = false; // if true, additional checks will be made to validate data, ... Decreases performance
|
||||
public static final boolean DEBUG_SLOW_LOADING = false; // if true, many Thread.sleep will be executed and the start will be delayed (by a lot)
|
||||
public static String CONFIG_FILENAME = "config.json"; // Filename of minosoft's base configuration (located in AppData/Minosoft/config)
|
||||
public static boolean SKIP_MOJANG_AUTHENTICATION = false; // disables all connections to mojang
|
||||
public static boolean COLORED_LOG = true; // the log should be colored with ANSI (does not affect base components)
|
||||
|
@ -96,6 +96,9 @@ public class AssetsManager {
|
||||
try {
|
||||
String hash = assets.get(filename);
|
||||
boolean compressed = (source == AssetsSource.MOJANG);
|
||||
if (StaticConfiguration.DEBUG_SLOW_LOADING) {
|
||||
Thread.sleep(100L);
|
||||
}
|
||||
if (!verifyAssetHash(hash, compressed)) {
|
||||
AssetsManager.downloadAsset(source, hash);
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
package de.bixilon.minosoft.gui.main;
|
||||
|
||||
import com.jfoenix.controls.*;
|
||||
import de.bixilon.minosoft.Minosoft;
|
||||
import de.bixilon.minosoft.data.locale.LocaleManager;
|
||||
import de.bixilon.minosoft.data.locale.Strings;
|
||||
@ -26,8 +27,8 @@ import javafx.collections.ObservableList;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.MenuItem;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Window;
|
||||
@ -53,35 +54,39 @@ public class AccountWindow implements Initializable {
|
||||
|
||||
@FXML
|
||||
public void addAccount() {
|
||||
Dialog<?> dialog = new Dialog<>();
|
||||
JFXAlert<?> dialog = new JFXAlert<>();
|
||||
dialog.setTitle(LocaleManager.translate(Strings.LOGIN_DIALOG_TITLE));
|
||||
dialog.setHeaderText(LocaleManager.translate(Strings.LOGIN_DIALOG_HEADER));
|
||||
GUITools.initializePane(dialog.getDialogPane());
|
||||
JFXDialogLayout layout = new JFXDialogLayout();
|
||||
layout.setHeading(new Label(LocaleManager.translate(Strings.LOGIN_DIALOG_HEADER)));
|
||||
|
||||
ButtonType loginButtonType = new ButtonType(LocaleManager.translate(Strings.BUTTON_LOGIN), ButtonBar.ButtonData.OK_DONE);
|
||||
dialog.getDialogPane().getButtonTypes().addAll(loginButtonType, ButtonType.CANCEL);
|
||||
JFXButton loginButton = new JFXButton(LocaleManager.translate(Strings.BUTTON_LOGIN));
|
||||
layout.setActions(loginButton);
|
||||
|
||||
GridPane grid = new GridPane();
|
||||
GridPane gridPane = new GridPane();
|
||||
gridPane.setHgap(15);
|
||||
gridPane.setVgap(15);
|
||||
|
||||
TextField email = new TextField();
|
||||
email.setPromptText(LocaleManager.translate(Strings.EMAIL));
|
||||
PasswordField password = new PasswordField();
|
||||
password.setPromptText(LocaleManager.translate(Strings.PASSWORD));
|
||||
JFXTextField emailField = new JFXTextField();
|
||||
emailField.setPromptText(LocaleManager.translate(Strings.EMAIL));
|
||||
|
||||
grid.add(new Label(LocaleManager.translate(Strings.EMAIL) + ":"), 0, 0);
|
||||
grid.add(email, 1, 0);
|
||||
grid.add(new Label(LocaleManager.translate(Strings.PASSWORD) + ":"), 0, 1);
|
||||
grid.add(password, 1, 1);
|
||||
Node loginButton = dialog.getDialogPane().lookupButton(loginButtonType);
|
||||
JFXPasswordField passwordField = new JFXPasswordField();
|
||||
passwordField.setPromptText(LocaleManager.translate(Strings.PASSWORD));
|
||||
|
||||
email.textProperty().addListener((observable, oldValue, newValue) -> loginButton.setDisable(newValue.trim().isEmpty()));
|
||||
gridPane.add(new Label(LocaleManager.translate(Strings.EMAIL) + ":"), 0, 0);
|
||||
gridPane.add(emailField, 1, 0);
|
||||
gridPane.add(new Label(LocaleManager.translate(Strings.PASSWORD) + ":"), 0, 1);
|
||||
gridPane.add(passwordField, 1, 1);
|
||||
|
||||
emailField.textProperty().addListener((observable, oldValue, newValue) -> loginButton.setDisable(newValue.trim().isEmpty()));
|
||||
loginButton.setDisable(true);
|
||||
|
||||
dialog.getDialogPane().setContent(grid);
|
||||
layout.setBody(gridPane);
|
||||
dialog.setContent(layout);
|
||||
|
||||
Platform.runLater(email::requestFocus);
|
||||
Platform.runLater(emailField::requestFocus);
|
||||
loginButton.addEventFilter(ActionEvent.ACTION, event -> {
|
||||
MojangAccountAuthenticationAttempt attempt = MojangAuthentication.login(email.getText(), password.getText());
|
||||
MojangAccountAuthenticationAttempt attempt = MojangAuthentication.login(emailField.getText(), passwordField.getText());
|
||||
if (attempt.succeeded()) {
|
||||
// login okay
|
||||
MojangAccount account = attempt.getAccount();
|
||||
@ -89,6 +94,7 @@ public class AccountWindow implements Initializable {
|
||||
account.saveToConfig();
|
||||
AccountListCell.listView.getItems().add(account);
|
||||
Log.info(String.format("Added and saved account (playerName=%s, email=%s, uuid=%s)", account.getPlayerName(), account.getMojangUserName(), account.getUUID()));
|
||||
dialog.close();
|
||||
return;
|
||||
}
|
||||
event.consume();
|
||||
@ -96,8 +102,8 @@ public class AccountWindow implements Initializable {
|
||||
error.setStyle("-fx-text-fill: red");
|
||||
error.setText(attempt.getError());
|
||||
|
||||
grid.add(new Label(LocaleManager.translate(Strings.ERROR)), 0, 2);
|
||||
grid.add(error, 1, 2);
|
||||
gridPane.add(new Label(LocaleManager.translate(Strings.ERROR)), 0, 2);
|
||||
gridPane.add(error, 1, 2);
|
||||
// ToDo resize window
|
||||
});
|
||||
|
||||
|
@ -33,7 +33,10 @@ import javafx.fxml.FXMLLoader;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.control.ButtonType;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.Menu;
|
||||
import javafx.scene.control.MenuItem;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
@ -74,16 +77,21 @@ public class MainWindow implements Initializable {
|
||||
stage.setOnCloseRequest(event -> {
|
||||
if (Minosoft.getSelectedAccount() == null) {
|
||||
event.consume();
|
||||
Alert alert = new Alert(Alert.AlertType.WARNING, LocaleManager.translate(Strings.ERROR), ButtonType.CANCEL, ButtonType.OK);
|
||||
alert.setHeaderText(LocaleManager.translate(Strings.MANAGE_ACCOUNTS_NO_ACCOUNT_ERROR_HEADER));
|
||||
alert.setContentText(LocaleManager.translate(Strings.MANAGE_ACCOUNTS_NO_ACCOUNT_ERROR_ERROR));
|
||||
alert.showAndWait().ifPresent((type) -> {
|
||||
if (type == ButtonType.OK) {
|
||||
System.exit(0);
|
||||
return;
|
||||
}
|
||||
alert.close();
|
||||
});
|
||||
JFXAlert<?> alert = new JFXAlert<>();
|
||||
GUITools.initializePane(alert.getDialogPane());
|
||||
alert.setTitle(LocaleManager.translate(Strings.ERROR));
|
||||
JFXDialogLayout layout = new JFXDialogLayout();
|
||||
layout.setHeading(new Label(LocaleManager.translate(Strings.MANAGE_ACCOUNTS_NO_ACCOUNT_ERROR_HEADER)));
|
||||
layout.setBody(new Label(LocaleManager.translate(Strings.MANAGE_ACCOUNTS_NO_ACCOUNT_ERROR_ERROR)));
|
||||
|
||||
JFXButton cancel = new JFXButton(ButtonType.CANCEL.getText());
|
||||
cancel.setOnAction((actionEvent -> alert.close()));
|
||||
JFXButton close = new JFXButton(ButtonType.OK.getText());
|
||||
close.setOnAction(actionEvent -> System.exit(0));
|
||||
|
||||
layout.setActions(cancel, close);
|
||||
alert.setContent(layout);
|
||||
alert.showAndWait();
|
||||
} else {
|
||||
stage.close();
|
||||
}
|
||||
@ -119,9 +127,9 @@ public class MainWindow implements Initializable {
|
||||
|
||||
JFXDialogLayout layout = new JFXDialogLayout();
|
||||
|
||||
GridPane vbox = new GridPane();
|
||||
vbox.setVgap(15);
|
||||
vbox.setHgap(50);
|
||||
GridPane gridPane = new GridPane();
|
||||
gridPane.setVgap(15);
|
||||
gridPane.setHgap(50);
|
||||
|
||||
JFXButton submitButton;
|
||||
|
||||
@ -131,9 +139,9 @@ public class MainWindow implements Initializable {
|
||||
|
||||
JFXTextField serverAddressField = new JFXTextField();
|
||||
serverAddressField.setPromptText(LocaleManager.translate(Strings.SERVER_ADDRESS));
|
||||
RequiredFieldValidator validator = new RequiredFieldValidator();
|
||||
validator.setMessage(LocaleManager.translate(Strings.SERVER_ADDRESS_INPUT_REQUIRED));
|
||||
serverAddressField.getValidators().add(validator);
|
||||
RequiredFieldValidator serverAddressValidator = new RequiredFieldValidator();
|
||||
serverAddressValidator.setMessage(LocaleManager.translate(Strings.SERVER_ADDRESS_INPUT_REQUIRED));
|
||||
serverAddressField.getValidators().add(serverAddressValidator);
|
||||
serverAddressField.focusedProperty().addListener((o, oldValue, newValue) -> {
|
||||
if (!newValue) {
|
||||
serverAddressField.validate();
|
||||
@ -166,19 +174,19 @@ public class MainWindow implements Initializable {
|
||||
}
|
||||
submitButton.setButtonType(JFXButton.ButtonType.RAISED);
|
||||
|
||||
vbox.add(new Label(LocaleManager.translate(Strings.SERVER_NAME) + ":"), 0, 0);
|
||||
vbox.add(serverNameField, 1, 0);
|
||||
vbox.add(new Label(LocaleManager.translate(Strings.SERVER_ADDRESS) + ":"), 0, 1);
|
||||
vbox.add(serverAddressField, 1, 1);
|
||||
vbox.add(new Label(LocaleManager.translate(Strings.VERSION) + ":"), 0, 2);
|
||||
vbox.add(GUITools.VERSION_COMBO_BOX, 1, 2);
|
||||
gridPane.add(new Label(LocaleManager.translate(Strings.SERVER_NAME) + ":"), 0, 0);
|
||||
gridPane.add(serverNameField, 1, 0);
|
||||
gridPane.add(new Label(LocaleManager.translate(Strings.SERVER_ADDRESS) + ":"), 0, 1);
|
||||
gridPane.add(serverAddressField, 1, 1);
|
||||
gridPane.add(new Label(LocaleManager.translate(Strings.VERSION) + ":"), 0, 2);
|
||||
gridPane.add(GUITools.VERSION_COMBO_BOX, 1, 2);
|
||||
|
||||
|
||||
layout.setBody(vbox);
|
||||
layout.setBody(gridPane);
|
||||
JFXButton closeButton = new JFXButton(ButtonType.CLOSE.getText());
|
||||
closeButton.setOnAction((actionEvent -> dialog.hide()));
|
||||
closeButton.setButtonType(JFXButton.ButtonType.RAISED);
|
||||
layout.setActions(submitButton, closeButton);
|
||||
layout.setActions(closeButton, submitButton);
|
||||
|
||||
|
||||
serverAddressField.textProperty().addListener((observable, oldValue, newValue) -> submitButton.setDisable(newValue.trim().isEmpty()));
|
||||
|
@ -13,6 +13,9 @@
|
||||
|
||||
package de.bixilon.minosoft.gui.main;
|
||||
|
||||
import com.jfoenix.controls.JFXAlert;
|
||||
import com.jfoenix.controls.JFXButton;
|
||||
import com.jfoenix.controls.JFXDialogLayout;
|
||||
import de.bixilon.minosoft.Minosoft;
|
||||
import de.bixilon.minosoft.data.Player;
|
||||
import de.bixilon.minosoft.data.locale.LocaleManager;
|
||||
@ -29,7 +32,6 @@ import de.bixilon.minosoft.protocol.ping.ServerListPing;
|
||||
import javafx.application.Platform;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.*;
|
||||
@ -302,17 +304,21 @@ public class ServerListCell extends ListCell<Server> implements Initializable {
|
||||
}
|
||||
|
||||
public void showInfo() {
|
||||
Dialog<?> dialog = new Dialog<>();
|
||||
dialog.setTitle("View server info: " + server.getName());
|
||||
JFXAlert<?> dialog = new JFXAlert<>();
|
||||
dialog.setTitle("View server info: " + server.getName().getMessage());
|
||||
GUITools.initializePane(dialog.getDialogPane());
|
||||
|
||||
ButtonType loginButtonType = ButtonType.CLOSE;
|
||||
dialog.getDialogPane().getButtonTypes().add(loginButtonType);
|
||||
JFXDialogLayout layout = new JFXDialogLayout();
|
||||
|
||||
|
||||
JFXButton closeButton = new JFXButton(ButtonType.CLOSE.getText());
|
||||
closeButton.setOnAction((actionEvent -> dialog.hide()));
|
||||
closeButton.setButtonType(JFXButton.ButtonType.RAISED);
|
||||
layout.setActions(closeButton);
|
||||
|
||||
GridPane grid = new GridPane();
|
||||
grid.setHgap(10);
|
||||
grid.setVgap(10);
|
||||
grid.setPadding(new Insets(20, 300, 10, 10));
|
||||
|
||||
TextFlow serverNameLabel = new TextFlow();
|
||||
serverNameLabel.getChildren().setAll(server.getName().getJavaFXText());
|
||||
@ -326,7 +332,9 @@ public class ServerListCell extends ListCell<Server> implements Initializable {
|
||||
}
|
||||
|
||||
int column = -1;
|
||||
grid.add(new Label(LocaleManager.translate(Strings.SERVER_NAME) + ":"), 0, ++column);
|
||||
Label a = new Label(LocaleManager.translate(Strings.SERVER_NAME) + ":");
|
||||
a.setWrapText(false);
|
||||
grid.add(a, 0, ++column);
|
||||
grid.add(serverNameLabel, 1, column);
|
||||
grid.add(new Label(LocaleManager.translate(Strings.SERVER_ADDRESS) + ":"), 0, ++column);
|
||||
grid.add(serverAddressLabel, 1, column);
|
||||
@ -380,9 +388,9 @@ public class ServerListCell extends ListCell<Server> implements Initializable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dialog.getDialogPane().setContent(grid);
|
||||
|
||||
// ToDo: size probably
|
||||
layout.setBody(grid);
|
||||
dialog.setContent(layout);
|
||||
dialog.showAndWait();
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
package de.bixilon.minosoft.gui.main;
|
||||
|
||||
import com.jfoenix.controls.JFXComboBox;
|
||||
import de.bixilon.minosoft.Minosoft;
|
||||
import de.bixilon.minosoft.config.ConfigurationPaths;
|
||||
import de.bixilon.minosoft.data.locale.LocaleManager;
|
||||
@ -20,7 +21,6 @@ import de.bixilon.minosoft.data.locale.Strings;
|
||||
import de.bixilon.minosoft.logging.Log;
|
||||
import de.bixilon.minosoft.logging.LogLevels;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.ComboBox;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.Tab;
|
||||
import javafx.scene.layout.GridPane;
|
||||
@ -30,7 +30,7 @@ import java.util.ResourceBundle;
|
||||
|
||||
public class SettingsWindow implements Initializable {
|
||||
public GridPane tabGeneral;
|
||||
public ComboBox<LogLevels> generalLogLevel;
|
||||
public JFXComboBox<LogLevels> generalLogLevel;
|
||||
public Tab general;
|
||||
public Tab download;
|
||||
public Label generalLogLevelLabel;
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
package de.bixilon.minosoft.gui.main;
|
||||
|
||||
import com.jfoenix.controls.JFXAlert;
|
||||
import com.jfoenix.controls.JFXDialogLayout;
|
||||
import com.jfoenix.controls.JFXProgressBar;
|
||||
import de.bixilon.minosoft.data.locale.LocaleManager;
|
||||
import de.bixilon.minosoft.data.locale.Strings;
|
||||
@ -20,18 +22,18 @@ import de.bixilon.minosoft.logging.Log;
|
||||
import de.bixilon.minosoft.util.CountUpAndDownLatch;
|
||||
import javafx.application.Application;
|
||||
import javafx.application.Platform;
|
||||
import javafx.scene.control.Dialog;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class StartProgressWindow extends Application {
|
||||
public final static CountDownLatch toolkitLatch = new CountDownLatch(2); // 2 if not started, 1 if started, 2 if loaded
|
||||
public static Dialog<Boolean> progressDialog;
|
||||
public static JFXAlert<Boolean> progressDialog;
|
||||
private static JFXProgressBar progressBar;
|
||||
private static Label progressLabel;
|
||||
private static boolean exit = false;
|
||||
|
||||
public static void show(CountUpAndDownLatch progress) {
|
||||
@ -42,20 +44,29 @@ public class StartProgressWindow extends Application {
|
||||
if (progress.getCount() == 0) {
|
||||
return;
|
||||
}
|
||||
AtomicReference<JFXProgressBar> progressBar = new AtomicReference<>();
|
||||
AtomicReference<Label> progressLabel = new AtomicReference<>();
|
||||
Platform.runLater(() -> {
|
||||
progressDialog = new Dialog<>();
|
||||
progressDialog = new JFXAlert<>();
|
||||
GUITools.initializePane(progressDialog.getDialogPane());
|
||||
progressDialog.setTitle(LocaleManager.translate(Strings.MINOSOFT_STILL_STARTING_TITLE));
|
||||
progressDialog.setHeaderText(LocaleManager.translate(Strings.MINOSOFT_STILL_STARTING_HEADER));
|
||||
GridPane grid = new GridPane();
|
||||
progressBar.set(new JFXProgressBar());
|
||||
progressBar.get().setPrefHeight(50);
|
||||
progressLabel.set(new Label());
|
||||
grid.add(progressBar.get(), 0, 0);
|
||||
grid.add(progressLabel.get(), 1, 0);
|
||||
progressDialog.getDialogPane().setContent(grid);
|
||||
|
||||
JFXDialogLayout layout = new JFXDialogLayout();
|
||||
layout.setHeading(new Label(LocaleManager.translate(Strings.MINOSOFT_STILL_STARTING_HEADER)));
|
||||
|
||||
|
||||
progressBar = new JFXProgressBar();
|
||||
progressBar.setPrefHeight(50);
|
||||
|
||||
progressLabel = new Label();
|
||||
|
||||
GridPane gridPane = new GridPane();
|
||||
gridPane.setHgap(20);
|
||||
gridPane.add(progressBar, 0, 0);
|
||||
gridPane.add(progressLabel, 1, 0);
|
||||
|
||||
|
||||
layout.setBody(gridPane);
|
||||
progressDialog.setContent(layout);
|
||||
|
||||
Stage stage = (Stage) progressDialog.getDialogPane().getScene().getWindow();
|
||||
stage.initModality(Modality.APPLICATION_MODAL);
|
||||
stage.setOnCloseRequest((request) -> System.exit(0));
|
||||
@ -72,8 +83,8 @@ public class StartProgressWindow extends Application {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Platform.runLater(() -> {
|
||||
progressBar.get().setProgress(1.0F - ((float) progress.getCount() / progress.getTotal()));
|
||||
progressLabel.get().setText(String.format("%d / %d", (progress.getTotal() - progress.getCount()), progress.getTotal()));
|
||||
progressBar.setProgress(1.0F - ((float) progress.getCount() / progress.getTotal()));
|
||||
progressLabel.setText(String.format("%d / %d", (progress.getTotal() - progress.getCount()), progress.getTotal()));
|
||||
});
|
||||
}
|
||||
hideDialog();
|
||||
|
@ -1,7 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.input.KeyCodeCombination?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<!--
|
||||
~ Minosoft
|
||||
~ Copyright (C) 2020 Moritz Zwerger
|
||||
@ -14,6 +11,9 @@
|
||||
~
|
||||
~ This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
-->
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.input.KeyCodeCombination?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<VBox xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" prefHeight="400.0" prefWidth="640.0" fx:controller="de.bixilon.minosoft.gui.main.MainWindow">
|
||||
<MenuBar VBox.vgrow="NEVER">
|
||||
<Menu fx:id="menuFile" mnemonicParsing="false" text="-_File-">
|
||||
@ -36,9 +36,9 @@
|
||||
<MenuItem fx:id="menuAccountManage" mnemonicParsing="false" onAction="#manageAccounts" text="-Manage-" />
|
||||
</Menu>
|
||||
</MenuBar>
|
||||
<AnchorPane VBox.vgrow="ALWAYS">
|
||||
<AnchorPane VBox.vgrow="ALWAYS" styleClass="anchor-pane">
|
||||
<ScrollPane fitToHeight="true" fitToWidth="true" layoutX="14.0" layoutY="14.0" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="500.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<BorderPane fx:id="serversPane" />
|
||||
<BorderPane fx:id="serversPane"/>
|
||||
</ScrollPane>
|
||||
</AnchorPane>
|
||||
</VBox>
|
||||
|
@ -1,7 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<!--
|
||||
~ Minosoft
|
||||
~ Copyright (C) 2020 Moritz Zwerger
|
||||
@ -14,23 +11,29 @@
|
||||
~
|
||||
~ This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
-->
|
||||
<VBox xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" prefHeight="400.0" prefWidth="640.0" fx:controller="de.bixilon.minosoft.gui.main.SettingsWindow">
|
||||
<TabPane prefHeight="200.0" prefWidth="200.0" tabClosingPolicy="UNAVAILABLE">
|
||||
<?import com.jfoenix.controls.JFXComboBox?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.Tab?>
|
||||
<?import javafx.scene.control.TabPane?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<VBox xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/11.0.1" prefHeight="400.0" prefWidth="640.0" fx:controller="de.bixilon.minosoft.gui.main.SettingsWindow" styleClass="vbox">
|
||||
<TabPane prefHeight="200.0" prefWidth="200.0" tabClosingPolicy="UNAVAILABLE" styleClass="tab-pane">
|
||||
<Tab fx:id="general" text="-General-">
|
||||
<GridPane fx:id="tabGeneral" hgap="10" minHeight="0.0" minWidth="0.0" prefHeight="429.0" prefWidth="640.0" vgap="10">
|
||||
<padding>
|
||||
<Insets bottom="10" left="10" right="300" top="10" />
|
||||
<Insets bottom="10" left="10" right="300" top="10"/>
|
||||
</padding>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints/>
|
||||
<ColumnConstraints/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
</rowConstraints>
|
||||
<Label fx:id="generalLogLevelLabel" text="-Log level-" />
|
||||
<ComboBox fx:id="generalLogLevel" prefWidth="150.0" GridPane.columnIndex="1" />
|
||||
<JFXComboBox fx:id="generalLogLevel" prefWidth="150.0" GridPane.columnIndex="1"/>
|
||||
</GridPane>
|
||||
</Tab>
|
||||
<Tab disable="true" fx:id="download" text="Download">
|
||||
|
@ -10,7 +10,7 @@
|
||||
}
|
||||
|
||||
.root {
|
||||
-fx-background-color: -primary-color;
|
||||
-fx-background-color: -secondary-color;
|
||||
-fx-text-fill: -secondary-text-color;
|
||||
}
|
||||
|
||||
@ -20,9 +20,14 @@
|
||||
-fx-text-fill: -secondary-text-color;
|
||||
}
|
||||
|
||||
.jfx-alert-content-container, .jfx-text-field, .label {
|
||||
.jfx-alert-content-container, .jfx-text-field {
|
||||
-fx-background-color: -secondary-color;
|
||||
-fx-text-fill: -secondary-text-color;
|
||||
-fx-prompt-text-fill: -secondary-light-color;
|
||||
}
|
||||
|
||||
.label {
|
||||
-fx-text-fill: -secondary-text-color;
|
||||
}
|
||||
|
||||
.jfx-combo-box {
|
||||
@ -54,3 +59,108 @@
|
||||
.combo-box-base {
|
||||
-fx-background-color: -secondary-color;
|
||||
}
|
||||
|
||||
.jfx-progress-bar > .track {
|
||||
-fx-background-color: -secondary-light-color;
|
||||
}
|
||||
|
||||
.jfx-progress-bar > .bar, .jfx-progress-bar:indeterminate > .bar {
|
||||
-fx-background-color: -primary-color;
|
||||
}
|
||||
|
||||
.jfx-progress-bar > .secondary-bar,
|
||||
.jfx-progress-bar:indeterminate > .secondary-bar {
|
||||
-fx-background-color: -secondary-light-color;
|
||||
}
|
||||
|
||||
.list-cell {
|
||||
-fx-background-color: -secondary-color;
|
||||
}
|
||||
|
||||
.list-cell:selected {
|
||||
-fx-background-color: -primary-color;
|
||||
}
|
||||
|
||||
.list-cell:filled:hover {
|
||||
-fx-background-color: -primary-dark-color;
|
||||
}
|
||||
|
||||
.menu-bar {
|
||||
-fx-background-color: -secondary-color;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
-fx-background-color: -secondary-color;
|
||||
-fx-text-fill: -secondary-text-color;
|
||||
}
|
||||
|
||||
.menu-item:selected {
|
||||
-fx-background-color: -primary-color;
|
||||
}
|
||||
|
||||
.menu-item:hover {
|
||||
-fx-background-color: -primary-dark-color;
|
||||
}
|
||||
|
||||
.menu-item:disabled {
|
||||
-fx-opacity: 80%;
|
||||
}
|
||||
|
||||
.menu-button {
|
||||
-fx-background-color: -secondary-light-color;
|
||||
-fx-text-fill: -secondary-text-color;
|
||||
}
|
||||
|
||||
.menu-bar .menu-button {
|
||||
-fx-background-color: -secondary-color;
|
||||
}
|
||||
|
||||
.menu-bar .menu-button:hover {
|
||||
-fx-background-color: -secondary-light-color;
|
||||
}
|
||||
|
||||
.menu-bar {
|
||||
-fx-background-color: -secondary-color;
|
||||
}
|
||||
|
||||
.context-menu {
|
||||
-fx-background-color: -secondary-color;
|
||||
}
|
||||
|
||||
.tab-pane, .tab, .tab-header-area .tab-header-background {
|
||||
-fx-background-color: -secondary-color;
|
||||
-fx-text-fill: -secondary-text-color;
|
||||
}
|
||||
|
||||
.tab:selected {
|
||||
-fx-background-color: -secondary-light-color;
|
||||
}
|
||||
|
||||
.tab-label {
|
||||
-fx-text-fill: -secondary-text-color;
|
||||
}
|
||||
|
||||
.vbox {
|
||||
-fx-background-color: -secondary-color;
|
||||
-fx-text-fill: -secondary-text-color;
|
||||
}
|
||||
|
||||
.anchor-pane {
|
||||
-fx-background-color: -secondary-color;
|
||||
}
|
||||
|
||||
.scroll-pane {
|
||||
-fx-background-color: -secondary-color;
|
||||
}
|
||||
|
||||
.scroll-pane:selected {
|
||||
-fx-background-color: -secondary-color;
|
||||
}
|
||||
|
||||
.jfx-password-field {
|
||||
-fx-text-fill: -secondary-text-color;
|
||||
}
|
||||
|
||||
.list-view {
|
||||
-fx-background-color: -secondary-color;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user