Merge pull request #260 from Yshmeel/dev

Добавил блюр на задний фон, сделал выбор по умолчанию в ComboBox типа авторизации
This commit is contained in:
Gravit 2019-05-15 00:02:53 +07:00 committed by GitHub
commit 77c8607d20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 146 additions and 128 deletions

View file

@ -1,4 +1,4 @@
var authPane, dimPane, serverPane, bar, consoleBar, optionsPane, consolePane; var authPane, dimPane, serverPane, bar, consoleBar, optionsPane, consolePane, loginPaneLayout, serverPaneLayout;
var loginField, passwordField, savePasswordBox, authOptions; var loginField, passwordField, savePasswordBox, authOptions;
var serverList, serverInfo, serverDescription, serverEntrance, serverLabel, serverStatus; var serverList, serverInfo, serverDescription, serverEntrance, serverLabel, serverStatus;
var profilesList = []; var profilesList = [];
@ -43,6 +43,9 @@ function initLoginScene() {
var pane = loginPane.lookup("#authPane"); var pane = loginPane.lookup("#authPane");
authPane = pane; authPane = pane;
var loginLayout = loginPane.lookup("#layout");
loginPaneLayout = loginLayout;
loginField = pane.lookup("#login"); loginField = pane.lookup("#login");
loginField.setOnMouseMoved(function(event){rootPane.fireEvent(event)}); loginField.setOnMouseMoved(function(event){rootPane.fireEvent(event)});
loginField.setOnAction(goAuth); loginField.setOnAction(goAuth);
@ -93,6 +96,9 @@ function initMenuScene() {
var pane = menuPane.lookup("#serverPane"); var pane = menuPane.lookup("#serverPane");
serverPane = pane; serverPane = pane;
var menuLayout = menuPane.lookup("#layout");
serverPaneLayout = menuLayout;
pane.lookup("#clientSettings").setOnAction(goOptions); pane.lookup("#clientSettings").setOnAction(goOptions);
serverList = pane.lookup("#serverlist").getContent(); serverList = pane.lookup("#serverlist").getContent();
serverInfo = pane.lookup("#serverinfo").getContent(); serverInfo = pane.lookup("#serverinfo").getContent();
@ -258,6 +264,7 @@ function verifyLauncher(e) {
authTypes[auth_type.displayName] = auth_type.name; authTypes[auth_type.displayName] = auth_type.name;
iter++; iter++;
}); });
authOptions.getSelectionModel().select(0);
var sm = authOptions.getSelectionModel().selectedIndexProperty(); var sm = authOptions.getSelectionModel().selectedIndexProperty();
// add listener to authOptions select // add listener to authOptions select
sm.addListener(new javafx.beans.value.ChangeListener({ sm.addListener(new javafx.beans.value.ChangeListener({
@ -416,7 +423,8 @@ var overlay = {
dimPane.setVisible(true); dimPane.setVisible(true);
dimPane.toFront(); dimPane.toFront();
loginPaneLayout.setEffect(new javafx.scene.effect.GaussianBlur(55));
serverPaneLayout.setEffect(new javafx.scene.effect.GaussianBlur(55));
fade(dimPane, 0.0, 0.0, 1.0, function(event) { fade(dimPane, 0.0, 0.0, 1.0, function(event) {
dimPane.requestFocus(); dimPane.requestFocus();
dimPane.getChildren().add(newOverlay); dimPane.getChildren().add(newOverlay);
@ -436,7 +444,8 @@ var overlay = {
authPane.setDisable(false); authPane.setDisable(false);
rootPane.requestFocus(); rootPane.requestFocus();
loginPaneLayout.setEffect(new javafx.scene.effect.GaussianBlur(0));
serverPaneLayout.setEffect(new javafx.scene.effect.GaussianBlur(0));
overlay.current = null; overlay.current = null;
if (onFinished !== null) { if (onFinished !== null) {
onFinished(); onFinished();

View file

@ -14,7 +14,9 @@
<!-- DrLeonardo Design --> <!-- DrLeonardo Design -->
<Pane fx:id="layout" prefWidth="740.0" xmlns="http://javafx.com/javafx/8.0.201" xmlns:fx="http://javafx.com/fxml/1"> <Pane fx:id="loginPane" prefWidth="740.0" xmlns="http://javafx.com/javafx/8.0.201" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane fx:id="layout" prefWidth="740.0">
<children> <children>
<Pane fx:id="authPane" layoutX="422.0" prefHeight="411.0" prefWidth="286.0" styleClass="loginPane"> <Pane fx:id="authPane" layoutX="422.0" prefHeight="411.0" prefWidth="286.0" styleClass="loginPane">
<children> <children>
@ -33,7 +35,10 @@
</children> </children>
</Pane> </Pane>
<JFXMasonryPane fx:id="news" prefHeight="432.0" prefWidth="423.0" styleClass="news" /> <JFXMasonryPane fx:id="news" prefHeight="432.0" prefWidth="423.0" styleClass="news" />
<Pane fx:id="bar" layoutX="692.0" prefHeight="425.0" prefWidth="43.0" styleClass="bar"> </children>
</Pane>
<Pane id="mask" opacity="0.0" prefHeight="425.0" prefWidth="694.0" visible="false" />
<Pane fx:id="bar" layoutX="696.0" prefHeight="425.0" prefWidth="43.0" styleClass="bar">
<children> <children>
<JFXButton id="hide" alignment="CENTER" contentDisplay="CENTER" layoutY="45.0" ripplerFill="#646464" text="" textAlignment="CENTER"> <JFXButton id="hide" alignment="CENTER" contentDisplay="CENTER" layoutY="45.0" ripplerFill="#646464" text="" textAlignment="CENTER">
<graphic> <graphic>
@ -52,7 +57,6 @@
</JFXButton> </JFXButton>
</children> </children>
</Pane> </Pane>
<Pane id="mask" opacity="0.0" prefHeight="425.0" prefWidth="694.0" visible="false" />
</children> </children>
<stylesheets> <stylesheets>
<URL value="@../../styles.css" /> <URL value="@../../styles.css" />

View file

@ -13,7 +13,9 @@
<!-- DrLeonardo Design --> <!-- DrLeonardo Design -->
<Pane fx:id="layout" maxHeight="-1.0" maxWidth="-1.0" prefHeight="400.0" prefWidth="600.0" visible="true" xmlns="http://javafx.com/javafx/8.0.201" xmlns:fx="http://javafx.com/fxml/1"> <Pane fx:id="serverPaneLayout" maxHeight="-1.0" maxWidth="-1.0" prefWidth="740.0" visible="true" xmlns="http://javafx.com/javafx/8.0.201" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane fx:id="layout" maxHeight="-1.0" maxWidth="-1.0" prefWidth="740.0" visible="true" xmlns="http://javafx.com/javafx/8.0.201" xmlns:fx="http://javafx.com/fxml/1">
<children> <children>
<Pane id="serverPane" prefHeight="450.0" prefWidth="693.0"> <Pane id="serverPane" prefHeight="450.0" prefWidth="693.0">
<children> <children>
@ -68,7 +70,9 @@
</Pane> </Pane>
</children> </children>
</Pane> </Pane>
<Pane fx:id="bar" layoutX="692.0" prefHeight="425.0" prefWidth="43.0" styleClass="bar"> </children>
</Pane>
<Pane fx:id="bar" layoutX="696.0" prefHeight="425.0" prefWidth="43.0" styleClass="bar">
<children> <children>
<JFXButton id="hide" alignment="CENTER" contentDisplay="CENTER" layoutY="45.0" ripplerFill="#646464" text="" textAlignment="CENTER"> <JFXButton id="hide" alignment="CENTER" contentDisplay="CENTER" layoutY="45.0" ripplerFill="#646464" text="" textAlignment="CENTER">
<graphic> <graphic>

View file

@ -3,6 +3,7 @@ Button, CheckBox, ComboBox, RadioButton {
-fx-cursor: hand; -fx-cursor: hand;
} }
/* Backgrounds */ /* Backgrounds */
#layout { #layout {
-fx-background-color: transparent; -fx-background-color: transparent;
@ -32,7 +33,7 @@ #serverStatus{
/* Mask */ /* Mask */
#mask { #mask {
-fx-background-color: rgba(0, 0, 0, 0.5); -fx-effect: DropShadow( gaussian , rgba(255,255,255,0.5) , 0,0,0,1 );
-fx-pref-width: 692px; -fx-pref-width: 692px;
-fx-pref-height: 450px; -fx-pref-height: 450px;
} }