[FIX] Обновление дизайна

This commit is contained in:
Gravit 2019-04-24 12:13:45 +07:00
parent 50873253b0
commit cd490a0868
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
7 changed files with 78 additions and 48 deletions

View file

@ -1,5 +1,5 @@
var authPane, dimPane, serverPane, bar, optionsPane, consolePane; var authPane, dimPane, serverPane, bar, consoleBar, optionsPane, consolePane;
var loginField, passwordField, savePasswordBox; var loginField, passwordField, savePasswordBox, authOptions;
var serverList, serverInfo, serverDescription, serverEntrance, serverLabel, serverStatus; var serverList, serverInfo, serverDescription, serverEntrance, serverLabel, serverStatus;
var profilesList = []; var profilesList = [];
var movePoint = null; var movePoint = null;
@ -113,17 +113,16 @@ function initConsoleScene() {
return; return;
} }
stage.setX(event.getScreenX() - movePoint.getX()); consoleStage.setX(event.getScreenX() - movePoint.getX());
stage.setY(event.getScreenY() - movePoint.getY()); consoleStage.setY(event.getScreenY() - movePoint.getY());
}); });
var pane = consoleMenu.lookup("#bar"); var pane = consoleMenu.lookup("#bar");
bar = pane; consoleBar = pane;
pane.lookup("#close").setOnAction(function(event){ javafx.application.Platform.exit()}); pane.lookup("#close").setOnAction(function(){
pane.lookup("#hide").setOnAction(function(event){ stage.setIconified(true)}); consoleStage.hide();
pane.lookup("#back").setOnAction(function(){
setCurrentScene(menuScene);
}); });
pane.lookup("#hide").setOnAction(function(event) { consoleStage.setIconified(true) });
var pane = consoleMenu.lookup("#consolePane"); var pane = consoleMenu.lookup("#consolePane");
consolePane = pane; consolePane = pane;
@ -196,7 +195,7 @@ function goAuth(event) {
/* ======== Console ======== */ /* ======== Console ======== */
function goConsole(event) { function goConsole(event) {
setCurrentScene(consoleScene); setConsoleCurrentScene(consoleScene);
} }
/* ======== Settings ======== */ /* ======== Settings ======== */

View file

@ -7,9 +7,6 @@ var processing = {
processing.spinner = processing.overlay.lookup("#spinner"); processing.spinner = processing.overlay.lookup("#spinner");
processing.description = processing.overlay.lookup("#description"); processing.description = processing.overlay.lookup("#description");
processing.errorImage = new javafx.scene.image.Image(
Launcher.getResourceURL("dialog/images/icons/error.png").toString());
}, },
resetOverlay: function() { resetOverlay: function() {
@ -20,7 +17,7 @@ var processing = {
setError: function(e) { setError: function(e) {
LogHelper.error(e); LogHelper.error(e);
processing.description.textProperty().unbind(); processing.description.textProperty().unbind();
processing.spinner.setImage(processing.errorImage); processing.errorImage.setImage(processing.errorImage);
processing.description.getStyleClass().add("error"); processing.description.getStyleClass().add("error");
processing.description.setText(e.toString()); processing.description.setText(e.toString());
}, },

View file

@ -18,16 +18,15 @@
<children> <children>
<Pane id="holder" prefHeight="425.0" prefWidth="694.0"> <Pane id="holder" prefHeight="425.0" prefWidth="694.0">
<children> <children>
<JFXCheckBox fx:id="autoEnter" checkedColor="#61b373" layoutX="14.0" layoutY="134.0" text="Автовход на сервер" unCheckedColor="#909090" /> <JFXCheckBox fx:id="autoEnter" checkedColor="#61b373" layoutX="14.0" layoutY="113.0" text="Автовход на сервер" unCheckedColor="#909090" />
<Text fill="#8c8c8c" layoutX="38.0" layoutY="150.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение авто-входа означает что вы сразу после загрузки клиента попадете на сервер" wrappingWidth="636.9999872148037" y="15.0" /> <Text fill="#8c8c8c" layoutX="38.0" layoutY="129.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение авто-входа означает что вы сразу после загрузки клиента попадете на сервер" wrappingWidth="636.9999872148037" y="15.0" />
<JFXCheckBox fx:id="fullScreen" checkedColor="#61b373" layoutX="13.0" layoutY="257.0" text="Клиент в полный экран" unCheckedColor="#909090" /> <JFXCheckBox fx:id="fullScreen" checkedColor="#61b373" layoutX="13.0" layoutY="236.0" text="Клиент в полный экран" unCheckedColor="#909090" />
<Text fill="#8c8c8c" layoutX="38.0" layoutY="274.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение данной функции позволяет запустить игру сразу в полноэкранном режиме" wrappingWidth="636.9999872148037" y="15.0" /> <Text fill="#8c8c8c" layoutX="38.0" layoutY="253.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение данной функции позволяет запустить игру сразу в полноэкранном режиме" wrappingWidth="636.9999872148037" y="15.0" />
<JFXCheckBox id="debug" checkedColor="#61b373" layoutX="13.0" layoutY="190.0" text="Режим Отладки" unCheckedColor="#909090" /> <JFXCheckBox id="debug" checkedColor="#61b373" layoutX="13.0" layoutY="169.0" text="Режим Отладки" unCheckedColor="#909090" />
<Text fill="#8c8c8c" layoutX="38.0" layoutY="205.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Режим отладки позволяет просмотреть лог запуска и работы программы в реальном времени прямо из лаунчера, что упрощает поиск нужной информации" wrappingWidth="637.0000016447157" y="15.0" /> <Text fill="#8c8c8c" layoutX="38.0" layoutY="184.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Режим отладки позволяет просмотреть лог запуска и работы программы в реальном времени прямо из лаунчера, что упрощает поиск нужной информации" wrappingWidth="637.0000016447157" y="15.0" />
<TextFlow layoutX="126.0" layoutY="15.0" prefHeight="16.0" prefWidth="112.0"> <TextFlow layoutX="126.0" layoutY="15.0" prefHeight="16.0" prefWidth="112.0">
<Text fx:id="ramLabel" /> <Text fx:id="ramLabel" />
</TextFlow> </TextFlow>
<Line endX="589.0" layoutX="100.0" layoutY="115.0" startX="-100.0" stroke="#5b3636" styleClass="lineHead" />
<JFXButton fx:id="deleteDir" layoutX="374.0" layoutY="356.0" prefHeight="25.0" prefWidth="245.0" text="Удалить клиенты" textAlignment="CENTER" wrapText="true" /> <JFXButton fx:id="deleteDir" layoutX="374.0" layoutY="356.0" prefHeight="25.0" prefWidth="245.0" text="Удалить клиенты" textAlignment="CENTER" wrapText="true" />
<JFXButton fx:id="changeDir" layoutY="400.0" prefHeight="25.0" prefWidth="200.0" text="Сменить директорию загрузки" textAlignment="CENTER" wrapText="true" /> <JFXButton fx:id="changeDir" layoutY="400.0" prefHeight="25.0" prefWidth="200.0" text="Сменить директорию загрузки" textAlignment="CENTER" wrapText="true" />
<Hyperlink id="dirLabel" alignment="TOP_LEFT" layoutX="200.0" layoutY="401.0" prefHeight="23.0" prefWidth="493.0" text="C:/Users" /> <Hyperlink id="dirLabel" alignment="TOP_LEFT" layoutX="200.0" layoutY="401.0" prefHeight="23.0" prefWidth="493.0" text="C:/Users" />

View file

@ -1,9 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?> <?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXTextArea?>
<?import com.jfoenix.controls.JFXTextField?>
<?import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIconView?> <?import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIconView?>
<?import java.net.URL?> <?import java.net.URL?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.Pane?>
<?import javafx.scene.shape.Line?>
<!-- DrLeonardo Design --> <!-- DrLeonardo Design -->
@ -21,14 +25,23 @@
<MaterialDesignIconView fill="WHITE" glyphName="CLOSE" size="30" textAlignment="CENTER" /> <MaterialDesignIconView fill="WHITE" glyphName="CLOSE" size="30" textAlignment="CENTER" />
</graphic> </graphic>
</JFXButton> </JFXButton>
<JFXButton id="back" alignment="CENTER" contentDisplay="CENTER" layoutY="380.0" ripplerFill="#646464" text="" textAlignment="CENTER">
<graphic>
<MaterialDesignIconView fill="WHITE" glyphName="CHEVRON_LEFT" size="30" textAlignment="CENTER" />
</graphic>
</JFXButton>
</children> </children>
</Pane> </Pane>
<Pane id="mask" opacity="0.0" prefHeight="425.0" prefWidth="694.0" visible="false" /> <JFXTextArea fx:id="output" prefHeight="386.0" prefWidth="693.0" unFocusColor="#ffffff00">
<padding>
<Insets left="10.0" right="10.0" top="10.0" />
</padding>
</JFXTextArea>
<JFXTextField id="textField" focusColor="#909090" layoutY="395.0" prefHeight="30.0" prefWidth="545.0" promptText="Введите команду..." unFocusColor="#ffffff00">
<opaqueInsets>
<Insets />
</opaqueInsets>
<padding>
<Insets left="10.0" />
</padding>
</JFXTextField>
<JFXButton id="send" defaultButton="true" layoutX="542.0" layoutY="395.0" prefHeight="30.0" prefWidth="147.0" text="Отправить" />
<Line endX="589.0" layoutX="98.0" layoutY="390.0" startX="-100.0" stroke="#5b3636" styleClass="lineHead" />
</children> </children>
<stylesheets> <stylesheets>
<URL value="@../../styles.css" /> <URL value="@../../styles.css" />

View file

@ -23,7 +23,7 @@
<JFXPasswordField id="password" alignment="CENTER" focusColor="#909090" layoutX="34.0" layoutY="197.0" promptText="Пароль" unFocusColor="#dadada" /> <JFXPasswordField id="password" alignment="CENTER" focusColor="#909090" layoutX="34.0" layoutY="197.0" promptText="Пароль" unFocusColor="#dadada" />
<JFXButton id="goAuth" layoutX="15.0" layoutY="365.0" styleClass="auth" text="ВОЙТИ" /> <JFXButton id="goAuth" layoutX="15.0" layoutY="365.0" styleClass="auth" text="ВОЙТИ" />
<JFXCheckBox id="rememberchb" fx:id="savePassword" checkedColor="#61b373" contentDisplay="CENTER" layoutX="63.0" layoutY="329.0" prefWidth="144.0" text="Сохранить пароль" textFill="#dadada" unCheckedColor="#909090" /> <JFXCheckBox id="rememberchb" fx:id="savePassword" checkedColor="#61b373" contentDisplay="CENTER" layoutX="63.0" layoutY="329.0" prefWidth="144.0" text="Сохранить пароль" textFill="#dadada" unCheckedColor="#909090" />
<JFXComboBox fx:id="combologin" focusColor="#909090" layoutX="35.0" layoutY="251.0" promptText="Метод авторизации" styleClass="combologin" unFocusColor="#dadada" /> <JFXComboBox id="authOptions" fx:id="authOptions" focusColor="#909090" layoutX="35.0" layoutY="251.0" promptText="Метод авторизации" styleClass="combologin" unFocusColor="#dadada" />
<Hyperlink id="link" fx:id="link" layoutX="98.0" layoutY="408.0" prefHeight="19.0" prefWidth="81.0" textAlignment="CENTER" /> <Hyperlink id="link" fx:id="link" layoutX="98.0" layoutY="408.0" prefHeight="19.0" prefWidth="81.0" textAlignment="CENTER" />
</children> </children>
</Pane> </Pane>

View file

@ -74,6 +74,16 @@ #hide, #back, #goConsole, #settings, #logout, #discord {
-fx-pref-height: 45px; -fx-pref-height: 45px;
} }
#send {
-fx-background-radius: 0;
-fx-text-fill: black;
-fx-background-position: center;
-jfx-button-type: FLAT;
-fx-background-color: #d8d8d8;
-fx-pref-width: 150px;
-fx-pref-height: 30px;
}
/* LoginMenu */ /* LoginMenu */
#authPane { #authPane {
-fx-background-color: rgba(255, 255, 255, 0.71); -fx-background-color: rgba(255, 255, 255, 0.71);

View file

@ -1,4 +1,4 @@
var app, stage, scene, loginScene, menuScene, consoleScene, optionsScene; var app, stage, scene, loginScene, menuScene, consoleScene, consoleStage, optionsScene;
var rootPane, loginPane, menuPane, consoleMenu, optionsMenu; var rootPane, loginPane, menuPane, consoleMenu, optionsMenu;
var LauncherApp = Java.extend(JSApplication, { var LauncherApp = Java.extend(JSApplication, {
@ -15,6 +15,11 @@ var LauncherApp = Java.extend(JSApplication, {
stage.setResizable(false); stage.setResizable(false);
stage.setTitle(config.title); stage.setTitle(config.title);
consoleStage = new javafx.stage.Stage();
consoleStage.initStyle(javafx.stage.StageStyle.TRANSPARENT);
consoleStage.setResizable(false);
consoleStage.setTitle(config.title);
config.icons.forEach(function(icon) { config.icons.forEach(function(icon) {
var iconURL = Launcher.getResourceURL(icon).toString(); var iconURL = Launcher.getResourceURL(icon).toString();
stage.getIcons().add(new javafx.scene.image.Image(iconURL)); stage.getIcons().add(new javafx.scene.image.Image(iconURL));
@ -61,6 +66,13 @@ function setCurrentScene(scene) {
stage.show(); stage.show();
} }
function setConsoleCurrentScene(scene) {
consoleStage.setScene(scene);
consoleStage.sizeToScene();
consoleStage.show();
}
function setRootParent(parent) { function setRootParent(parent) {
scene.setRoot(parent); scene.setRoot(parent);
} }