Merge branch 'dev' of github.com:GravitLauncher/Launcher into dev

This commit is contained in:
Gravit 2019-05-15 17:32:10 +07:00
commit ebceab5501
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
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,45 +14,49 @@
<!-- 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> <children>
<Pane fx:id="authPane" layoutX="422.0" prefHeight="411.0" prefWidth="286.0" styleClass="loginPane"> <Pane fx:id="layout" prefWidth="740.0">
<children> <children>
<Pane fx:id="logo" layoutX="72.0" layoutY="62.0" prefWidth="124.0" styleClass="logo"> <Pane fx:id="authPane" layoutX="422.0" prefHeight="411.0" prefWidth="286.0" styleClass="loginPane">
</Pane> <children>
<JFXTextField id="login" alignment="CENTER" focusColor="#5fd97a" layoutX="34.0" layoutY="196.0" promptText="Логин" unFocusColor="#dadada" /> <Pane fx:id="logo" layoutX="72.0" layoutY="62.0" prefWidth="124.0" styleClass="logo">
<JFXPasswordField id="password" alignment="CENTER" focusColor="#5fd97a" layoutX="34.0" layoutY="249.0" promptText="Пароль" unFocusColor="#dadada" /> </Pane>
<JFXButton id="goAuth" layoutX="34.0" layoutY="370.0" styleClass="auth" text="ВОЙТИ" /> <JFXTextField id="login" alignment="CENTER" focusColor="#5fd97a" layoutX="34.0" layoutY="196.0" promptText="Логин" unFocusColor="#dadada" />
<JFXCheckBox id="rememberchb" fx:id="savePassword" checkedColor="#5fd97a" contentDisplay="CENTER" layoutX="63.0" layoutY="297.0" prefWidth="144.0" text="Сохранить пароль" textFill="#dadada" unCheckedColor="#909090" /> <JFXPasswordField id="password" alignment="CENTER" focusColor="#5fd97a" layoutX="34.0" layoutY="249.0" promptText="Пароль" unFocusColor="#dadada" />
<JFXComboBox id="authOptions" fx:id="authOptions" focusColor="#5fd97a" layoutX="34.0" layoutY="341.0" prefHeight="25.0" prefWidth="200.0" promptText="Авторизация 1" unFocusColor="#70666600"> <JFXButton id="goAuth" layoutX="34.0" layoutY="370.0" styleClass="auth" text="ВОЙТИ" />
<styleClass> <JFXCheckBox id="rememberchb" fx:id="savePassword" checkedColor="#5fd97a" contentDisplay="CENTER" layoutX="63.0" layoutY="297.0" prefWidth="144.0" text="Сохранить пароль" textFill="#dadada" unCheckedColor="#909090" />
<String fx:value="combologin" /> <JFXComboBox id="authOptions" fx:id="authOptions" focusColor="#5fd97a" layoutX="34.0" layoutY="341.0" prefHeight="25.0" prefWidth="200.0" promptText="Авторизация 1" unFocusColor="#70666600">
<String fx:value="combologin-popup" /> <styleClass>
</styleClass></JFXComboBox> <String fx:value="combologin" />
<Hyperlink id="link" fx:id="link" layoutX="94.0" layoutY="422.0" prefHeight="19.0" prefWidth="81.0" textAlignment="CENTER" /> <String fx:value="combologin-popup" />
</children> </styleClass></JFXComboBox>
<Hyperlink id="link" fx:id="link" layoutX="94.0" layoutY="422.0" prefHeight="19.0" prefWidth="81.0" textAlignment="CENTER" />
</children>
</Pane>
<JFXMasonryPane fx:id="news" prefHeight="432.0" prefWidth="423.0" styleClass="news" />
</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>
<JFXButton id="hide" alignment="CENTER" contentDisplay="CENTER" layoutY="45.0" ripplerFill="#646464" text="" textAlignment="CENTER">
<graphic>
<MaterialDesignIconView fill="WHITE" glyphName="MINUS" size="30" textAlignment="CENTER" />
</graphic>
</JFXButton>
<JFXButton id="close" alignment="CENTER" contentDisplay="CENTER" ripplerFill="#fb8c8c" text="" textAlignment="CENTER">
<graphic>
<MaterialDesignIconView fill="WHITE" glyphName="CLOSE" size="30" textAlignment="CENTER" />
</graphic>
</JFXButton>
<JFXButton id="discord" alignment="CENTER" contentDisplay="CENTER" layoutY="370.0" ripplerFill="#646464" text="" textAlignment="CENTER">
<graphic>
<MaterialDesignIconView fill="#5fd97a" glyphName="MESSAGE_TEXT" size="20" textAlignment="CENTER" />
</graphic>
</JFXButton>
</children>
</Pane> </Pane>
<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>
<JFXButton id="hide" alignment="CENTER" contentDisplay="CENTER" layoutY="45.0" ripplerFill="#646464" text="" textAlignment="CENTER">
<graphic>
<MaterialDesignIconView fill="WHITE" glyphName="MINUS" size="30" textAlignment="CENTER" />
</graphic>
</JFXButton>
<JFXButton id="close" alignment="CENTER" contentDisplay="CENTER" ripplerFill="#fb8c8c" text="" textAlignment="CENTER">
<graphic>
<MaterialDesignIconView fill="WHITE" glyphName="CLOSE" size="30" textAlignment="CENTER" />
</graphic>
</JFXButton>
<JFXButton id="discord" alignment="CENTER" contentDisplay="CENTER" layoutY="370.0" ripplerFill="#646464" text="" textAlignment="CENTER">
<graphic>
<MaterialDesignIconView fill="#5fd97a" glyphName="MESSAGE_TEXT" size="20" textAlignment="CENTER" />
</graphic>
</JFXButton>
</children>
</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,94 +13,98 @@
<!-- 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> <children>
<Pane id="serverPane" prefHeight="450.0" prefWidth="693.0"> <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>
<ScrollPane id="serverlist" hbarPolicy="NEVER" layoutX="1.0" prefHeight="450.0" prefWidth="307.0" visible="true">
<content>
<FlowPane focusTraversable="false" prefHeight="446.0" prefWidth="306.0" prefWrapLength="0.0" rowValignment="TOP" vgap="10.0" visible="true">
<JFXButton id="servercontainer" ripplerFill="#ffffff80" text="">
<FlowPane.margin>
<Insets bottom="10.0" />
</FlowPane.margin></JFXButton>
<padding>
<Insets left="10.0" top="10.0" />
</padding>
</FlowPane>
</content>
</ScrollPane>
<Pane id="serverentrance" layoutX="306.0" prefHeight="425.0" prefWidth="388.0" styleClass="serverentrance">
<children> <children>
<ScrollPane id="serverinfo" hbarPolicy="NEVER" layoutX="4.0" layoutY="53.0" pannable="true" prefHeight="322.0" prefWidth="381.0" visible="true"> <Pane id="serverPane" prefHeight="450.0" prefWidth="693.0">
<content> <children>
<FlowPane id="" focusTraversable="false" orientation="HORIZONTAL" prefHeight="310.0" prefWidth="369.0" rowValignment="TOP" visible="true"> <ScrollPane id="serverlist" hbarPolicy="NEVER" layoutX="1.0" prefHeight="450.0" prefWidth="307.0" visible="true">
<padding> <content>
<Insets bottom="10.0" left="15.0" top="7.0" /> <FlowPane focusTraversable="false" prefHeight="446.0" prefWidth="306.0" prefWrapLength="0.0" rowValignment="TOP" vgap="10.0" visible="true">
</padding> <JFXButton id="servercontainer" ripplerFill="#ffffff80" text="">
<children> <FlowPane.margin>
<Label id="serverDescription" alignment="TOP_LEFT" contentDisplay="LEFT" nodeOrientation="LEFT_TO_RIGHT" prefHeight="274.0" prefWidth="349.0" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis magna tellus, in bibendum tortor dignissim non. Phasellus vel tincidunt nulla, eu convallis ligula. Suspendisse ut diam vestibulum, tincidunt neque ut, posuere risus. Pellentesque posuere molestie eros, quis laoreet ante ornare quis. Morbi eu tortor fermentum, iaculis risus sit amet, fringilla augue. Aenean nulla purus, rutrum non sapien et, convallis tincidunt purus. Vivamus a eros pulvinar, dignissim leo lacinia, sodales nulla. Aliquam tortor augue, cursus a rutrum viverra, consequat non tellus. Donec porta nisl sed quam dictum commodo. Sed et vulputate dolor. Morbi ultrices justo vitae convallis semper. Donec sodales velit vel velit faucibus, et scelerisque felis finibus. Sed rutrum lacinia mauris, porta cursus mauris tempor eu. Duis turpis nulla, dictum vitae commodo rhoncus, pretium in turpis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos." textAlignment="JUSTIFY" textFill="#141414" wrapText="true" /> <Insets bottom="10.0" />
</children> </FlowPane.margin></JFXButton>
</FlowPane> <padding>
</content> <Insets left="10.0" top="10.0" />
</ScrollPane> </padding>
<JFXButton id="clientLaunch" layoutX="19.0" layoutY="380.0" prefHeight="51.0" prefWidth="285.0" styleClass="clientLaunch" text="ИГРАТЬ"> </FlowPane>
<font> </content>
<Font size="22.0" /> </ScrollPane>
</font> <Pane id="serverentrance" layoutX="306.0" prefHeight="425.0" prefWidth="388.0" styleClass="serverentrance">
</JFXButton> <children>
<JFXButton id="clientSettings" alignment="CENTER" centerShape="false" contentDisplay="CENTER" layoutX="305.0" layoutY="380.0" prefHeight="51.0" prefWidth="60.0" ripplerFill="#84da96" styleClass="clientSettings" text="" textAlignment="CENTER"> <ScrollPane id="serverinfo" hbarPolicy="NEVER" layoutX="4.0" layoutY="53.0" pannable="true" prefHeight="322.0" prefWidth="381.0" visible="true">
<graphic> <content>
<FontAwesomeIconView fill="WHITE" glyphName="SLIDERS" size="30.0" /> <FlowPane id="" focusTraversable="false" orientation="HORIZONTAL" prefHeight="310.0" prefWidth="369.0" rowValignment="TOP" visible="true">
</graphic></JFXButton> <padding>
<Label id="serverStatus" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="165.0" layoutY="12.0" prefHeight="25.0" prefWidth="97.0" text="12/100" textAlignment="RIGHT" textFill="WHITE"> <Insets bottom="10.0" left="15.0" top="7.0" />
<font> </padding>
<Font name="System Bold" size="16.0" /> <children>
</font> <Label id="serverDescription" alignment="TOP_LEFT" contentDisplay="LEFT" nodeOrientation="LEFT_TO_RIGHT" prefHeight="274.0" prefWidth="349.0" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis magna tellus, in bibendum tortor dignissim non. Phasellus vel tincidunt nulla, eu convallis ligula. Suspendisse ut diam vestibulum, tincidunt neque ut, posuere risus. Pellentesque posuere molestie eros, quis laoreet ante ornare quis. Morbi eu tortor fermentum, iaculis risus sit amet, fringilla augue. Aenean nulla purus, rutrum non sapien et, convallis tincidunt purus. Vivamus a eros pulvinar, dignissim leo lacinia, sodales nulla. Aliquam tortor augue, cursus a rutrum viverra, consequat non tellus. Donec porta nisl sed quam dictum commodo. Sed et vulputate dolor. Morbi ultrices justo vitae convallis semper. Donec sodales velit vel velit faucibus, et scelerisque felis finibus. Sed rutrum lacinia mauris, porta cursus mauris tempor eu. Duis turpis nulla, dictum vitae commodo rhoncus, pretium in turpis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos." textAlignment="JUSTIFY" textFill="#141414" wrapText="true" />
</Label> </children>
<Label id="serverLabel" layoutX="20.0" layoutY="11.0" prefHeight="27.0" prefWidth="203.0" text="СЕРВЕР"> </FlowPane>
<font> </content>
<Font name="System Bold" size="18.0" /> </ScrollPane>
</font> <JFXButton id="clientLaunch" layoutX="19.0" layoutY="380.0" prefHeight="51.0" prefWidth="285.0" styleClass="clientLaunch" text="ИГРАТЬ">
</Label> <font>
<JFXButton id="logout" alignment="CENTER" contentDisplay="CENTER" layoutX="295.0" layoutY="12.0" prefHeight="25.0" prefWidth="81.0" ripplerFill="#61616100" text="Выйти" textAlignment="CENTER" /> <Font size="22.0" />
</font>
</JFXButton>
<JFXButton id="clientSettings" alignment="CENTER" centerShape="false" contentDisplay="CENTER" layoutX="305.0" layoutY="380.0" prefHeight="51.0" prefWidth="60.0" ripplerFill="#84da96" styleClass="clientSettings" text="" textAlignment="CENTER">
<graphic>
<FontAwesomeIconView fill="WHITE" glyphName="SLIDERS" size="30.0" />
</graphic></JFXButton>
<Label id="serverStatus" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="165.0" layoutY="12.0" prefHeight="25.0" prefWidth="97.0" text="12/100" textAlignment="RIGHT" textFill="WHITE">
<font>
<Font name="System Bold" size="16.0" />
</font>
</Label>
<Label id="serverLabel" layoutX="20.0" layoutY="11.0" prefHeight="27.0" prefWidth="203.0" text="СЕРВЕР">
<font>
<Font name="System Bold" size="18.0" />
</font>
</Label>
<JFXButton id="logout" alignment="CENTER" contentDisplay="CENTER" layoutX="295.0" layoutY="12.0" prefHeight="25.0" prefWidth="81.0" ripplerFill="#61616100" text="Выйти" textAlignment="CENTER" />
</children>
</Pane>
</children>
</Pane>
</children> </children>
</Pane> </Pane>
</children> <Pane fx:id="bar" layoutX="696.0" prefHeight="425.0" prefWidth="43.0" styleClass="bar">
</Pane> <children>
<Pane fx:id="bar" layoutX="692.0" prefHeight="425.0" prefWidth="43.0" styleClass="bar"> <JFXButton id="hide" alignment="CENTER" contentDisplay="CENTER" layoutY="45.0" ripplerFill="#646464" text="" textAlignment="CENTER">
<children> <graphic>
<JFXButton id="hide" alignment="CENTER" contentDisplay="CENTER" layoutY="45.0" ripplerFill="#646464" text="" textAlignment="CENTER"> <MaterialDesignIconView fill="WHITE" glyphName="MINUS" size="30" textAlignment="CENTER" />
<graphic> </graphic>
<MaterialDesignIconView fill="WHITE" glyphName="MINUS" size="30" textAlignment="CENTER" /> </JFXButton>
</graphic> <JFXButton id="close" alignment="CENTER" contentDisplay="CENTER" ripplerFill="#fb8c8c" text="" textAlignment="CENTER">
</JFXButton> <graphic>
<JFXButton id="close" alignment="CENTER" contentDisplay="CENTER" ripplerFill="#fb8c8c" text="" textAlignment="CENTER"> <MaterialDesignIconView fill="WHITE" glyphName="CLOSE" size="30" textAlignment="CENTER" />
<graphic> </graphic>
<MaterialDesignIconView fill="WHITE" glyphName="CLOSE" size="30" textAlignment="CENTER" /> </JFXButton>
</graphic> <JFXButton id="discord" alignment="CENTER" contentDisplay="CENTER" layoutY="380.0" ripplerFill="#646464" text="" textAlignment="CENTER">
</JFXButton> <graphic>
<JFXButton id="discord" alignment="CENTER" contentDisplay="CENTER" layoutY="380.0" ripplerFill="#646464" text="" textAlignment="CENTER"> <MaterialDesignIconView fill="#5fd97a" glyphName="MESSAGE_TEXT" size="20" smooth="false" textAlignment="CENTER" />
<graphic> </graphic>
<MaterialDesignIconView fill="#5fd97a" glyphName="MESSAGE_TEXT" size="20" smooth="false" textAlignment="CENTER" /> </JFXButton>
</graphic> <JFXButton id="settings" alignment="CENTER" contentDisplay="CENTER" layoutY="90.0" ripplerFill="#646464" text="" textAlignment="CENTER">
</JFXButton> <graphic>
<JFXButton id="settings" alignment="CENTER" contentDisplay="CENTER" layoutY="90.0" ripplerFill="#646464" text="" textAlignment="CENTER"> <MaterialDesignIconView fill="WHITE" glyphName="SETTINGS" size="20" textAlignment="CENTER" />
<graphic> </graphic>
<MaterialDesignIconView fill="WHITE" glyphName="SETTINGS" size="20" textAlignment="CENTER" /> </JFXButton>
</graphic> <JFXButton id="goConsole" alignment="CENTER" contentDisplay="CENTER" layoutY="138.0" ripplerFill="#646464" text="" textAlignment="CENTER">
</JFXButton> <graphic>
<JFXButton id="goConsole" alignment="CENTER" contentDisplay="CENTER" layoutY="138.0" ripplerFill="#646464" text="" textAlignment="CENTER"> <MaterialDesignIconView fill="WHITE" glyphName="CONSOLE" size="20" textAlignment="CENTER" />
<graphic> </graphic>
<MaterialDesignIconView fill="WHITE" glyphName="CONSOLE" size="20" textAlignment="CENTER" /> </JFXButton>
</graphic> </children>
</JFXButton> </Pane>
</children> <Pane id="mask" opacity="0.0" prefHeight="425.0" prefWidth="694.0" visible="false" />
</Pane> </children>
<Pane id="mask" opacity="0.0" prefHeight="425.0" prefWidth="694.0" visible="false" /> <stylesheets>
</children> <URL value="@../../styles.css" />
<stylesheets> <URL value="@../../servers.css" />
<URL value="@../../styles.css" /> </stylesheets>
<URL value="@../../servers.css" />
</stylesheets>
</Pane> </Pane>

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;
} }