Merge pull request #212 from GravitLauncher/feature/design

update design
This commit is contained in:
Gravit 2019-04-06 19:05:10 +07:00 committed by GitHub
commit f747ef55d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 611 additions and 697 deletions

View file

@ -9,17 +9,15 @@ var config = {
linkURL: new java.net.URL("https://gravitlauncher.ml"), // URL for link under "Auth" button
// Menu config
discord_url: new java.net.URL("https://discord.gg/bf7ZtwC"),
discord: new java.net.URL("https://discord.gg/aJK6nMN"),
// Settings defaults
settingsMagic: 0xC0DE5, // Ancient magic, don't touch
settingsMagic: 0xC0DE5, // Magic, don't touch
autoEnterDefault: false, // Should autoEnter be enabled by default?
fullScreenDefault: false, // Should fullScreen be enabled by default?
ramDefault: 1024, // Default RAM amount (0 for auto)
};
// ====== DON'T TOUCH! ====== //
DirBridge.dir = DirBridge.getLauncherDir(config.dir);
if (!IOHelper.isDir(DirBridge.dir)) {
java.nio.file.Files.createDirectory(DirBridge.dir);

View file

@ -1,55 +1,44 @@
// Ининциализируем кучу всяких переменных
var authPane, dimPane, serverPane;
// Переменные от окна входа
var loginField, passwordField, forgotButton, savePasswordBox, registerButton;
// Переменные от основной менюшки
var authPane, dimPane, serverPane, bar;
var loginField, passwordField, savePasswordBox;
var serverList, serverInfo, serverDescription, serverEntrance, serverLabel, serverStatus;
var discord_url;
// Прочие вспомогалки
var profilesList = []; // Ассоциативный массив: "кнопка сервера" => "профиль сервера"
var movePoint = null; // Координата, хранящая опроную точку при Drag'е
var pingers = {}; // ддосеры серверов
var loginData; // Буфер для данных авторизации
var profilesList = [];
var movePoint = null;
var pingers = {};
var loginData;
function initLauncher() {
// Инициализируем основы
initLoginScene();
initMenuScene();
// Инициализируем доп. менюшки
debug.initOverlay();
processing.initOverlay();
settingsOverlay.initOverlay();
update.initOverlay();
options.initOverlay();
// Делаем запрос на проверку свежести лаунчера, ну и сервера заодно обновляем
verifyLauncher();
}
/* ======== init Login ======== */
function initLoginScene() {
loginPane.setOnMousePressed(function(event){ movePoint = new javafx.geometry.Point2D(event.getSceneX(), event.getSceneY())});
loginPane.setOnMouseDragged(function(event) {
if(movePoint === null) {
return;
}
// Обновляем позицию панели
stage.setX(event.getScreenX() - movePoint.getX());
stage.setY(event.getScreenY() - movePoint.getY());
});
loginPane.lookup("#exitbtn").setOnAction(function(event){ javafx.application.Platform.exit()});
loginPane.lookup("#hidebtn").setOnAction(function(event){ stage.setIconified(true)});
loginPane.lookup("#discord_url").setOnAction(function(){ openURL(config.discord_url); });
var pane = loginPane.lookup("#bar");
bar = pane;
loginPane.lookup("#close").setOnAction(function(event){ javafx.application.Platform.exit()});
loginPane.lookup("#hide").setOnAction(function(event){ stage.setIconified(true)});
loginPane.lookup("#discord").setOnAction(function(){ openURL(config.discord_url); });
var pane = loginPane.lookup("#authPane");
authPane = pane;
// Lookup login field
loginField = pane.lookup("#login");
loginField.setOnMouseMoved(function(event){rootPane.fireEvent(event)});
loginField.setOnAction(goAuth);
@ -57,7 +46,6 @@ function initLoginScene() {
loginField.setText(settings.login);
}
// Lookup password field
passwordField = pane.lookup("#password");
passwordField.setOnMouseMoved(function(event){rootPane.fireEvent(event)});
passwordField.setOnAction(goAuth);
@ -66,19 +54,17 @@ function initLoginScene() {
passwordField.setPromptText("*** Сохранённый ***");
}
// Lookup save password box
savePasswordBox = pane.lookup("#rememberchb");
savePasswordBox.setSelected(settings.login === null || settings.rsaPassword !== null);
// Lookup hyperlink text and actions
var link = pane.lookup("#link");
link.setText(config.linkText);
link.setOnAction(function(event) app.getHostServices().showDocument(config.linkURL.toURI()));
// Lookup action buttons
pane.lookup("#goAuth").setOnAction(goAuth);
}
/* ======== init Menu ======== */
function initMenuScene() {
menuPane.setOnMousePressed(function(event){ movePoint = new javafx.geometry.Point2D(event.getSceneX(), event.getSceneY())});
menuPane.setOnMouseDragged(function(event) {
@ -86,19 +72,24 @@ function initMenuScene() {
return;
}
// Обновляем позицию панели
stage.setX(event.getScreenX() - movePoint.getX());
stage.setY(event.getScreenY() - movePoint.getY());
});
menuPane.lookup("#exitbtn").setOnAction(function(event){ javafx.application.Platform.exit()});
menuPane.lookup("#hidebtn").setOnAction(function(event){ stage.setIconified(true)});
var pane = loginPane.lookup("#bar");
bar = pane;
menuPane.lookup("#close").setOnAction(function(event){ javafx.application.Platform.exit()});
menuPane.lookup("#hide").setOnAction(function(event){ stage.setIconified(true)});
menuPane.lookup("#discord").setOnAction(function(){ openURL(config.discord); });
menuPane.lookup("#settings").setOnAction(goSettings);
menuPane.lookup("#logout").setOnAction(function(){
setCurrentScene(loginScene);
});
var pane = menuPane.lookup("#serverPane");
serverPane = pane;
menuPane.lookup("#discord_url").setOnAction(function(){ openURL(config.discord_url); });
pane.lookup("#settingsbtn").setOnAction(goSettings);
pane.lookup("#clientbtn").setOnAction(goOptions);
pane.lookup("#clientSettings").setOnAction(goOptions);
serverList = pane.lookup("#serverlist").getContent();
serverInfo = pane.lookup("#serverinfo").getContent();
serverDescription = serverInfo.lookup("#serverDescription");
@ -106,46 +97,37 @@ function initMenuScene() {
serverEntrance = pane.lookup("#serverentrance");
serverStatus = serverEntrance.lookup("#serverStatus");
serverLabel = serverEntrance.lookup("#serverLabel");
serverEntrance.lookup("#serverLaunch").setOnAction(function(){
serverEntrance.lookup("#clientLaunch").setOnAction(function(){
doUpdate(profilesList[serverHolder.old], loginData.pp, loginData.accessToken);
});
pane.lookup("#logoutbtn").setOnAction(function(){
setCurrentScene(loginScene);
});
}
/* ======== init Offline ======== */
function initOffline() {
// Меняем заголовок(Хер его знает зачем, его всё равно нигде не видно...
stage.setTitle(config.title + " [Offline]");
// Set login field as username field
loginField.setPromptText("Имя пользователя");
if (!VerifyHelper.isValidUsername(settings.login)) {
loginField.setText(""); // Reset if not valid
}
// Disable password field
passwordField.setDisable(true);
passwordField.setPromptText("Недоступно");
passwordField.setText("");
}
/* ======== Handler functions ======== */
/* ======== Auth ======== */
function goAuth(event) {
// Verify there's no other overlays
if (overlay.current !== null) {
return;
}
// Get login
var login = loginField.getText();
if (login.isEmpty()) {
return; // Maybe throw exception?)
return;
}
// Get password if online-mode
var rsaPassword = null;
if (!passwordField.isDisable()) {
var password = passwordField.getText();
@ -160,11 +142,11 @@ function goAuth(event) {
settings.rsaPassword = savePasswordBox.isSelected() ? rsaPassword : null;
}
// Show auth overlay
settings.login = login;
doAuth(login, rsaPassword);
}
/* ======== Settings ======== */
function goSettings(event) {
// Verify there's no other overlays
if (overlay.current !== null) {
@ -175,6 +157,7 @@ function goSettings(event) {
overlay.show(settingsOverlay.overlay, null);
}
/* ======== Options ======== */
function goOptions(event) {
// Verify there's no other overlays
if (overlay.current !== null) {
@ -230,7 +213,6 @@ function doUpdate(profile, pp, accessToken) {
var digest = profile.isUpdateFastCheck();
overlay.swap(0, update.overlay, function(event) {
// Update asset dir
update.resetOverlay("Обновление файлов ресурсов");
var assetDirName = profile.getAssetDir();
var assetDir = settings.updatesDir.resolve(assetDirName);
@ -240,7 +222,6 @@ var digest = profile.isUpdateFastCheck();
makeUpdateRequest(assetDirName, assetDir, assetMatcher, digest, function(assetHDir) {
settings.lastHDirs.put(assetDirName, assetHDir.hdir);
// Update client dir
update.resetOverlay("Обновление файлов клиента");
var clientDirName = profile.getDir();
var clientDir = settings.updatesDir.resolve(clientDirName);
@ -268,7 +249,6 @@ function doDebugClient(process) {
return;
}
// Switch to debug overlay
debug.resetOverlay();
overlay.swap(0, debug.overlay, function(event) debugProcess(process));
}
@ -276,23 +256,28 @@ function doDebugClient(process) {
/* ======== Server handler functions ======== */
function updateProfilesList(profiles) {
profilesList = [];
// Set profiles items
serverList.getChildren().clear();
var index = 0;
profiles.forEach(function (profile, i, arr) {
profiles.forEach(function(profile, i, arr) {
pingers[profile] = new ServerPinger(profile.getServerSocketAddress(), profile.getVersion());
var serverBtn = new javafx.scene.control.ToggleButton(profile);
(function () {
serverBtn.getStyleClass().add("server-button");
serverBtn.getStyleClass().add("server-button-" + profile);
(function() {
profilesList[serverBtn] = profile;
var hold = serverBtn;
var hIndex = index;
serverBtn.setOnAction(function (event) {
serverBtn.setOnAction(function(event) {
serverHolder.set(hold);
settings.profile = hIndex;
});
})();
serverList.getChildren().add(serverBtn);
if(profile.getOptional() != null) profile.updateOptionalGraph();
if (profile.getOptional() != null) profile.updateOptionalGraph();
index++;
});
LogHelper.debug("Load selected %d profile",settings.profile);
@ -310,7 +295,7 @@ function pingServer(btn) {
task.setOnSucceeded(function(event) {
var result = task.getValue();
if(btn==serverHolder.old){
setServerStatus(java.lang.String.format("%d из %d", result.onlinePlayers, result.maxPlayers));
setServerStatus(java.lang.String.format("%d из %d", result.onlinePlayers, result.maxPlayers));
}
});
task.setOnFailed(function(event){ if(btn==serverHolder.old){setServerStatus("Недоступен")}});
@ -328,7 +313,6 @@ function fade(region, delay, from, to, onFinished) {
transition.setOnFinished(onFinished);
}
// Launch transition
transition.setDelay(javafx.util.Duration.millis(delay));
transition.setFromValue(from);
transition.setToValue(to);
@ -339,24 +323,19 @@ var overlay = {
current: null,
show: function(newOverlay, onFinished) {
// Freeze root pane
authPane.setDisable(true);
overlay.current = newOverlay;
// Show dim pane
dimPane.setVisible(true);
dimPane.toFront();
// Fade dim pane
fade(dimPane, 0.0, 0.0, 1.0, function(event) {
dimPane.requestFocus();
dimPane.getChildren().add(newOverlay);
// Fix overlay position
newOverlay.setLayoutX((dimPane.getPrefWidth() - newOverlay.getPrefWidth()) / 2.0);
newOverlay.setLayoutY((dimPane.getPrefHeight() - newOverlay.getPrefHeight()) / 2.0);
// Fade in
fade(newOverlay, 0.0, 0.0, 1.0, onFinished);
});
},
@ -367,11 +346,9 @@ var overlay = {
fade(dimPane, 0.0, 1.0, 0.0, function(event) {
dimPane.setVisible(false);
// Unfreeze root pane
authPane.setDisable(false);
rootPane.requestFocus();
// Reset overlay state
overlay.current = null;
if (onFinished !== null) {
onFinished();
@ -385,22 +362,19 @@ var overlay = {
fade(overlay.current, delay, 1.0, 0.0, function(event) {
dimPane.requestFocus();
if(overlay.current==null){
overlay.show(newOverlay, onFinished);
return;
}
// Hide old overlay
if (overlay.current !== newOverlay) {
var child = dimPane.getChildren();
child.set(child.indexOf(overlay.current), newOverlay);
}
// Fix overlay position
newOverlay.setLayoutX((dimPane.getPrefWidth() - newOverlay.getPrefWidth()) / 2.0);
newOverlay.setLayoutY((dimPane.getPrefHeight() - newOverlay.getPrefHeight()) / 2.0);
// Show new overlay
overlay.current = newOverlay;
fade(newOverlay, 0.0, 0.0, 1.0, onFinished);
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 663 B

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,014 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View file

@ -1,127 +0,0 @@
Button, CheckBox, ComboBox, RadioButton {
-fx-cursor: hand;
}
#layout {
-fx-background-color: transparent;
}
#mask{
-fx-background-color: rgba(0, 0, 0, 0.5);
}
#link {
-fx-font-weight: bold;
-fx-font-size: 8pt;
-fx-opacity: 0.5;
-fx-text-fill: #ffffff;
}
#exitbtn{
-fx-background-position: center;
-fx-background-color: transparent;
-fx-opacity: 0.4;
-fx-background-radius: 0;
-fx-background-repeat: no-repeat;
-fx-background-image: url('images/icons/close.png');
}
#hidebtn{
-fx-background-position: center;
-fx-background-color: transparent;
-fx-opacity: 0.4;
-fx-background-radius: 0;
-fx-padding: 10;
-fx-background-repeat: no-repeat;
-fx-background-image: url('images/icons/hide.png');
}
#hidebtn:hover, #hidebtn:pressed, #exitbtn:hover, #exitbtn:pressed, #link:hover, #link:pressed { -fx-opacity: 1; }
#password, #login {
-fx-background-color: rgba(0, 0, 0, 0.08);
-fx-background-radius: 0;
}
#discord_url{
-fx-opacity: 0.8;
-fx-background-color: transparent;
-fx-background-image: url('images/icons/discord.png');
-fx-background-repeat: no-repeat;
}
#discord_url:hover, #discord_url:pressed { -fx-opacity: 1; }
#rememberchb{
-fx-background-color: transparent;
-fx-font-size: 13;
-fx-background-image: url('images/icons/checkbox.png');
-fx-background-repeat: no-repeat;
}
#rememberchb .mark {
-fx-background-color: transparent;
}
#rememberchb .box {
-fx-background-color: transparent;
}
#rememberchb:selected{
-fx-background-color: transparent;
-fx-background-image: url('images/icons/checkbox_checked.png');
-fx-background-repeat: no-repeat;
}
#rememberchb:selected .mark {
-fx-background-color: transparent;
}
#rememberchb:selected .box {
-fx-background-color: transparent;
}
#errormessage{
-fx-background-color: transparent;
-fx-text-alignment: center;
-fx-text-fill: #ffd96f;
}
.loginPane {
-fx-background-color: rgba(0, 0, 0, 0.46);
}
.btn {
-fx-font-weight: bold;
-fx-font-size: 13pt;
-fx-background-radius: 0;
-fx-background-color: #61B373;
-fx-text-fill: #ffffff;
}
.btn:hover, .btn:selected {
-fx-background-color: #74C085;
}
.text-input{
-fx-background-color: transparent;
-fx-focus-color: transparent;
-fx-background-repeat: no-repeat;
-fx-text-fill: #E5E5E5;
-fx-prompt-text-fill: #E5E5E5;
-fx-background-color: transparent;
-fx-font-family: "Segoe UI";
-fx-font-size: 13px;
-fx-font-weight: bold;
}
.text-input:hover{
-fx-background-color: transparent;
}
.text-input:focused{
-fx-background-color: transparent;
}
.text-area .scroll-pane {
-fx-background-color: transparent;
}
.text-area .scroll-pane .viewport{
-fx-background-color: transparent;
}
.text-area .scroll-pane .content{
-fx-background-color: transparent;
}
.error{
-fx-text-fill: #ff5555;
}

View file

@ -1,63 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXCheckBox?>
<?import com.jfoenix.controls.JFXComboBox?>
<?import com.jfoenix.controls.JFXMasonryPane?>
<?import com.jfoenix.controls.JFXPasswordField?>
<?import com.jfoenix.controls.JFXTextField?>
<?import java.net.URL?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Hyperlink?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.Pane?>
<!-- DrLeonardo Design -->
<Pane fx:id="layout" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity"
prefHeight="400.0" prefWidth="600.0" visible="true" xmlns="http://javafx.com/javafx/8.0.20"
xmlns:fx="http://javafx.com/fxml/1">
<children>
<ImageView id="background" fitHeight="400.0" fitWidth="600.0">
<image>
<Image preserveRatio="true" smooth="true" url="@images/background.png"/>
</image>
</ImageView>
<Pane layoutX="160.0" layoutY="61.0" prefHeight="306.0" prefWidth="267.0" styleClass="loginPane">
<children>
<ImageView id="background" fitHeight="27.0" fitWidth="123.0" layoutX="72.0" layoutY="33.0">
<image>
<Image url="@images/icons/logo.png"/>
</image>
</ImageView>
</children>
</Pane>
<Pane id="authPane" layoutX="1.0" layoutY="2.0" prefHeight="400.0" prefWidth="600.0">
<children>
<TextField id="login" alignment="CENTER" layoutX="175.0" layoutY="144.0" prefHeight="45.0"
prefWidth="233.0" promptText="Логин"/>
<PasswordField id="password" alignment="CENTER" layoutX="175.0" layoutY="197.0" prefHeight="45.0"
prefWidth="233.0" promptText="Пароль"/>
<Button id="goAuth" layoutX="159.0" layoutY="319.0" mnemonicParsing="false" opacity="1.0"
prefHeight="45.0" prefWidth="267.0" styleClass="btn" text="ВОЙТИ" visible="true"/>
<CheckBox id="rememberchb" fx:id="savePassword" contentDisplay="CENTER" layoutX="224.0" layoutY="291.0"
prefHeight="17.0" prefWidth="137.0" text="Сохранить пароль" textFill="#dadada"/>
<Hyperlink id="link" fx:id="link" layoutY="371.0" prefHeight="30.0" prefWidth="158.0"
textAlignment="CENTER"/>
<Button id="discord_url" layoutX="278.0" layoutY="373.0" minHeight="16.0" minWidth="28.0"
mnemonicParsing="false" prefHeight="16.0" prefWidth="28.0" text=""/>
</children>
</Pane>
<Pane id="mask" opacity="0.0" prefHeight="400.0" prefWidth="600.0" visible="false"/>
<Button id="hidebtn" focusTraversable="false" layoutX="535.0" layoutY="2.0" minHeight="25.0" minWidth="35.0"
prefHeight="25.0" prefWidth="25.0"/>
<Button id="exitbtn" focusTraversable="false" layoutX="574.0" layoutY="2.0" minHeight="25.0" minWidth="20.0"
prefHeight="25.0" prefWidth="20.0"/>
<ImageView fitHeight="12.0" fitWidth="11.0" layoutX="9.0" layoutY="8.0">
<image>
<Image url="@images/icons/logo_small.png"/>
</image>
</ImageView>
</children>
<stylesheets>
<URL value="@login.css"/>
</stylesheets>
<Pane fx:id="layout" prefWidth="740.0" xmlns="http://javafx.com/javafx/8.0.201" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane fx:id="authPane" layoutX="423.0" prefHeight="411.0" prefWidth="286.0" styleClass="loginPane">
<children>
<Pane fx:id="logo" layoutX="72.0" layoutY="62.0" prefWidth="124.0" styleClass="logo">
</Pane>
<JFXTextField id="login" alignment="CENTER" focusColor="#909090" layoutX="34.0" layoutY="144.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="ВОЙТИ" />
<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" />
<Hyperlink id="link" fx:id="link" layoutX="98.0" layoutY="408.0" prefHeight="19.0" prefWidth="81.0" textAlignment="CENTER" />
</children>
</Pane>
<JFXMasonryPane fx:id="news" prefHeight="425.0" prefWidth="423.0" styleClass="news" />
<Pane fx:id="bar" layoutX="693.0" prefHeight="425.0" prefWidth="43.0" styleClass="bar">
<children>
<JFXButton id="hide" alignment="CENTER" contentDisplay="CENTER" layoutY="45.0" text="" textAlignment="CENTER" />
<JFXButton id="close" alignment="CENTER" contentDisplay="CENTER" text="" textAlignment="CENTER" />
<JFXButton id="discord" alignment="CENTER" contentDisplay="CENTER" layoutY="380.0" text="" textAlignment="CENTER" />
</children>
</Pane>
<Pane id="mask" opacity="0.0" prefHeight="425.0" prefWidth="694.0" visible="false" />
</children>
<stylesheets>
<URL value="@styles.css" />
</stylesheets>
</Pane>

View file

@ -1,170 +0,0 @@
Button, CheckBox, ComboBox, RadioButton {
-fx-cursor: hand;
}
#layout{
-fx-background-color: transparent;
}
#mask {
-fx-background-color: rgba(0, 0, 0, 0.5);
}
#serverLabel{
-fx-text-fill: #fff;
}
#exitbtn{
-fx-background-position: center;
-fx-background-color: transparent;
-fx-opacity: 0.4;
-fx-background-radius: 0;
-fx-background-repeat: no-repeat;
-fx-background-image: url('images/icons/close.png');
}
#hidebtn{
-fx-background-position: center;
-fx-background-color: transparent;
-fx-opacity: 0.4;
-fx-background-radius: 0;
-fx-padding: 10;
-fx-background-repeat: no-repeat;
-fx-background-image: url('images/icons/hide.png');
}
#logoutbtn{
-fx-background-color: #CE5757;
-fx-text-fill: #fff;
-fx-background-radius: 0;
-fx-prompt-text-fill: #fff;
-fx-font-family: "Segoe UI";
-fx-font-size: 16px;
-fx-font-weight: bold;
}
#logoutbtn:hover{
-fx-background-color: #DB5252;
}
#serverlist{
-fx-background-color: transparent;
-fx-padding: 5 10;
}
#serverlist > .viewport {
-fx-background-color: transparent;
}
#serverdesc{
-fx-background-color: transparent;
-fx-padding: 5 10;
}
#serverdesc > .viewport {
-fx-background-color: transparent;
}
#serverinfo{
-fx-background-color: transparent;
}
#serverinfo > .viewport {
-fx-background-color: transparent;
}
#servercontainer{
-fx-background-color: transparent;
}
#servercontainer .toggle-button{
-fx-background-color: transparent;
-fx-pref-width: 161;
-fx-pref-height: 50;
-fx-background-image: url('images/icons/server.png');
-fx-padding: 0 0 0 40;
-fx-opacity: 0.7;
-fx-alignment: CENTER-LEFT;
-fx-text-fill: #fff;
-fx-translate-y: -1px;
-fx-font-family: "Segoe UI";
-fx-font-size: 16px;
-fx-font-weight: bold;
}
#servercontainer .toggle-button:hover{
-fx-opacity: 1;
}
#servercontainer .toggle-button:selected{
-fx-opacity: 1;
-fx-background-image: url('images/icons/server.png');
}
#discord_url{
-fx-opacity: 0.8;
-fx-background-color: transparent;
-fx-background-image: url('images/icons/discord.png');
-fx-background-repeat: no-repeat;
}
#settingsbtn{
-fx-opacity: 0.4;
-fx-background-position: center;
-fx-background-color: transparent;
-fx-background-radius: 0;
-fx-background-repeat: no-repeat;
-fx-background-image: url('images/icons/settings.png');
}
#serverLaunch{
-fx-background-radius: 0;
-fx-font-weight: bold;
-fx-font-size: 18pt;
-fx-background-color: #61B373;
-fx-text-fill: #ffffff;
}
#clientbtn{
-fx-background-radius: 0;
-fx-background-color: #61B373;
-fx-background-image: url('images/icons/options.png');
-fx-background-repeat: no-repeat;
}
#serverLaunch:hover, #serverLaunch:pressed, #clientbtn:hover, #clientbtn:pressed {
-fx-background-color: #74C085;
}
#settingsbtn:hover, #settingsbtn:pressed, #discord_url:hover, #discord_url:pressed, #hidebtn:hover, #hidebtn:pressed, #exitbtn:hover, #exitbtn:pressed { -fx-opacity: 1; }
.toggle-button:disabled{
-fx-opacity: 1.0;
}
.menuPane {
-fx-background-color: rgba(0, 0, 0, 0.46);
}
.heading{
-fx-text-fill: #555555;
}
.scroll-pane {
-fx-background-color: transparent;
}
.scroll-bar:horizontal, .scroll-bar:vertical{
-fx-background-color:transparent;
}
.increment-button, .decrement-button, .increment-arrow, .decrement-arrow {
-fx-background-color: transparent;
-fx-border-color: transparent;
}
.scroll-bar:horizontal .track,
.scroll-bar:vertical .track{
-fx-background-color: transparent;
-fx-border-color: transparent;
}
.scroll-bar:horizontal .thumb,
.scroll-bar:vertical .thumb {
-fx-background-color: rgba(0, 0, 0, 0.19);
-fx-background-radius: 0;
}
.scroll-bar{
-fx-font-size: 6px;
}
.scroll-pane > .corner {
-fx-background-color: black;
}

View file

@ -1,114 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import java.net.URL?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.FlowPane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<!-- 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.20" xmlns:fx="http://javafx.com/fxml/1">
<children>
<ImageView id="background" fitHeight="400.0" fitWidth="600.0">
<image>
<Image url="@images/background.png"/>
</image>
</ImageView>
<ImageView fitHeight="12.0" fitWidth="11.0" layoutX="9.0" layoutY="8.0">
<image>
<Image url="@images/icons/logo_small.png"/>
</image>
</ImageView>
<Pane layoutX="171.0" layoutY="28.0" prefHeight="372.0" prefWidth="429.0" styleClass="menuPane"/>
<Pane id="serverPane" prefHeight="400.0" prefWidth="600.0">
<children>
<Button id="hidebtn" focusTraversable="false" layoutX="545.0" layoutY="2.0" minHeight="25.0"
minWidth="20.0" prefHeight="25.0" prefWidth="25.0" textAlignment="CENTER"/>
<Button id="exitbtn" alignment="CENTER" contentDisplay="CENTER" focusTraversable="false" layoutX="572.0"
layoutY="2.0" minHeight="25.0" minWidth="20.0" prefHeight="25.0" prefWidth="25.0" rotate="360.0"
textAlignment="CENTER" translateX="0.0"/>
<ScrollPane id="serverlist" hbarPolicy="NEVER" layoutX="0.0" layoutY="27.0" prefHeight="306.0"
prefWidth="171.0" visible="true">
<content>
<FlowPane id="servercontainer" alignment="TOP_LEFT" columnHalignment="LEFT"
focusTraversable="false" hgap="0.0" maxHeight="0.0" maxWidth="0.0"
orientation="HORIZONTAL" prefHeight="-1.0" prefWidth="161.0" prefWrapLength="0.0"
rowValignment="TOP" vgap="7.0" visible="true">
<padding>
<Insets top="10.0"/>
</padding>
</FlowPane>
</content>
</ScrollPane>
<ScrollPane id="serverinfo" hbarPolicy="NEVER" layoutX="170.0" layoutY="71.0" pannable="true"
prefHeight="234.0" prefWidth="432.0" visible="true">
<content>
<FlowPane id="" focusTraversable="false" orientation="HORIZONTAL" prefHeight="219.0"
prefWidth="428.0" rowValignment="TOP" visible="true">
<padding>
<Insets bottom="10.0" left="15.0" top="7.0"/>
</padding>
<children>
<Label id="serverDescription" alignment="TOP_LEFT" contentDisplay="LEFT"
nodeOrientation="LEFT_TO_RIGHT" prefHeight="204.0" prefWidth="407.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."
textFill="#d3d3d3" wrapText="true">
<font>
<Font size="14.0" fx:id="x3"/>
</font>
</Label>
</children>
</FlowPane>
</content>
</ScrollPane>
<Pane id="serverentrance" layoutX="170.0" layoutY="27.0" prefHeight="372.0" prefWidth="430.0">
<children>
<Button id="serverLaunch" layoutX="180.0" layoutY="294.0" mnemonicParsing="false"
prefHeight="60.0" prefWidth="182.0" text="ИГРАТЬ">
<font>
<Font size="22.0"/>
</font>
</Button>
<Button id="clientbtn" layoutX="363.0" layoutY="294.0" mnemonicParsing="false" prefHeight="60.0"
prefWidth="50.0" text=""/>
<Label id="serverStatus" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="14.0"
layoutY="312.0" opacity="0.61" prefHeight="25.0" prefWidth="153.0" text="12/100"
textAlignment="RIGHT" textFill="WHITE">
<font>
<Font name="System Bold" size="16.0"/>
</font>
</Label>
<Label id="serverLabel" layoutX="2.0" layoutY="11.0" prefHeight="40.0" prefWidth="274.0"
text="СЕРВЕР IFARM">
<font>
<Font name="System Bold" size="18.0"/>
</font>
<padding>
<Insets left="14.0"/>
</padding>
</Label>
<Button id="discord_url" alignment="BOTTOM_CENTER" contentDisplay="CENTER" layoutX="386.0"
layoutY="23.0" minHeight="16.0" minWidth="28.0" mnemonicParsing="false"
prefHeight="16.0" prefWidth="28.0" text="" textAlignment="CENTER"/>
</children>
</Pane>
<Button id="logoutbtn" layoutX="19.0" layoutY="350.0" mnemonicParsing="false" prefHeight="31.0"
prefWidth="133.0" styleClass="logoutbtn" text="Выйти"/>
<Button id="settingsbtn" alignment="CENTER" contentDisplay="CENTER" layoutX="518.0" layoutY="2.0"
mnemonicParsing="false" prefHeight="25.0" prefWidth="25.0" text="" textAlignment="CENTER"/>
</children>
<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">
<children>
<Pane id="serverPane" prefHeight="425.0" prefWidth="693.0">
<children>
<ScrollPane id="serverlist" hbarPolicy="NEVER" layoutX="1.0" prefHeight="425.0" prefWidth="307.0" visible="true">
<content>
<FlowPane focusTraversable="false" prefHeight="421.0" prefWidth="306.0" prefWrapLength="0.0" rowValignment="TOP" vgap="10.0" visible="true">
<JFXButton id="servercontainer" text="Button">
<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="307.0" prefHeight="425.0" prefWidth="388.0" styleClass="serverentrance">
<children>
<ScrollPane id="serverinfo" hbarPolicy="NEVER" layoutX="4.0" layoutY="53.0" pannable="true" prefHeight="372.0" prefWidth="382.0" visible="true">
<content>
<FlowPane id="" focusTraversable="false" orientation="HORIZONTAL" prefHeight="221.0" prefWidth="362.0" rowValignment="TOP" visible="true">
<padding>
<Insets bottom="10.0" left="15.0" top="7.0" />
</padding>
<children>
<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" />
</children>
</FlowPane>
</content>
</ScrollPane>
<JFXButton id="clientLaunch" layoutX="20.0" layoutY="355.0" styleClass="clientLaunch" text="ИГРАТЬ">
<font>
<Font size="22.0" />
</font>
</JFXButton>
<JFXButton id="clientSettings" alignment="CENTER" centerShape="false" contentDisplay="CENTER" layoutX="281.0" layoutY="355.0" styleClass="clientSettings" text="" textAlignment="CENTER" />
<Label id="serverStatus" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="306.0" layoutY="12.0" prefHeight="25.0" prefWidth="60.0" text="12/100" textAlignment="RIGHT" textFill="WHITE">
<font>
<Font name="System Bold" size="16.0" />
</font>
</Label>
<Label id="serverLabel" layoutX="4.0" layoutY="11.0" prefHeight="31.0" prefWidth="265.0" text="СЕРВЕР IFARM">
<font>
<Font name="System Bold" size="18.0" />
</font>
<padding>
<Insets left="14.0" />
</padding>
</Label>
</children>
</Pane>
<Pane id="mask" opacity="0.0" prefHeight="400.0" prefWidth="600.0" visible="false"/>
</children>
<stylesheets>
<URL value="@mainmenu.css"/>
</stylesheets>
</children>
</Pane>
<Pane fx:id="bar" layoutX="693.0" prefHeight="425.0" prefWidth="43.0" styleClass="bar">
<children>
<JFXButton id="hide" alignment="CENTER" contentDisplay="CENTER" layoutY="45.0" text="" textAlignment="CENTER" />
<JFXButton id="close" alignment="CENTER" contentDisplay="CENTER" styleClass="close" text="" textAlignment="CENTER" />
<JFXButton id="discord" alignment="CENTER" contentDisplay="CENTER" layoutY="380.0" text="" textAlignment="CENTER" />
<JFXButton id="settings" alignment="CENTER" contentDisplay="CENTER" layoutY="92.0" text="" textAlignment="CENTER" />
<JFXButton id="logout" alignment="CENTER" contentDisplay="CENTER" layoutY="334.0" text="" />
</children>
</Pane>
<Pane id="mask" opacity="0.0" prefHeight="425.0" prefWidth="694.0" visible="false" />
</children>
<stylesheets>
<URL value="@styles.css" />
</stylesheets>
</Pane>

View file

@ -1,16 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Offline-режим</title>
</head>
<head>
<meta charset="UTF-8" />
<title>Offline-режим</title>
</head>
<body style="color:red">
<h2>Offline-режим</h2>
Лаунчер запущен в Offline-режиме. В этом режиме Вы можете запустить любой ранее загруженный клиент
с любым именем пользователя, при этом вход на серверы с авторизацией, а так же система скинов и плащей <b>может не
работать</b>.
Скорее всего, проблема вызвана сбоем на сервере или неполадками в интернет-подключении.
Проверьте состояние интернет-подключения или обратитесь к администратору сервера.
</body>
<body style="color:red">
<h2>Offline-режим</h2>
Лаунчер запущен в Offline-режиме. В этом режиме Вы можете запустить любой ранее загруженный клиент
с любым именем пользователя, при этом вход на серверы с авторизацией, а так же система скинов и плащей <b>может не работать</b>.
Скорее всего, проблема вызвана сбоем на сервере или неполадками в интернет-подключении.
Проверьте состояние интернет-подключения или обратитесь к администратору сервера.
</body>
</html>

View file

@ -7,15 +7,13 @@
<!-- DrLeonardo Design -->
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1"
xmlns="http://javafx.com/javafx/8.0.20">
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.20">
<stylesheets>
<URL value="@debug.css"/>
<URL value="@debug.css" />
</stylesheets>
<!-- Debug controls -->
<TextArea fx:id="output" layoutY="28.0" prefHeight="372.0" prefWidth="600.0"/>
<Button fx:id="copy" defaultButton="true" layoutX="375.0" layoutY="352.0" prefHeight="30.0" prefWidth="100.0"
text="Копировать"/>
<Button fx:id="action" layoutX="480.0" layoutY="352.0" prefHeight="30.0" prefWidth="100.0"/>
<TextArea fx:id="output" layoutY="28.0" prefHeight="372.0" prefWidth="600.0" />
<Button fx:id="copy" defaultButton="true" layoutX="375.0" layoutY="352.0" prefHeight="30.0" prefWidth="100.0" text="Копировать" />
<Button fx:id="action" layoutX="480.0" layoutY="352.0" prefHeight="30.0" prefWidth="100.0" />
</Pane>

View file

@ -9,28 +9,26 @@
<!-- DrLeonardo Design -->
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.20"
xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane id="holder" layoutX="171.0" layoutY="28.0" prefHeight="371.0" prefWidth="428.0">
<children>
<ScrollPane id="modlist" hbarPolicy="NEVER">
<content>
<VBox prefHeight="370.0" prefWidth="428.0">
<children>
</children>
<padding>
<Insets left="10.0" top="8.0"/>
</padding>
</VBox>
</content>
</ScrollPane>
<Button fx:id="apply" defaultButton="true" layoutX="318.0" layoutY="336.0" prefHeight="25.0"
prefWidth="100.0" text="Применить"/>
</children>
</Pane>
</children>
<stylesheets>
<URL value="@options.css"/>
</stylesheets>
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.20" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane id="holder" layoutX="171.0" layoutY="28.0" prefHeight="371.0" prefWidth="428.0">
<children>
<ScrollPane id="modlist" hbarPolicy="NEVER">
<content>
<VBox prefHeight="370.0" prefWidth="428.0">
<children>
</children>
<padding>
<Insets left="10.0" top="8.0" />
</padding>
</VBox>
</content>
</ScrollPane>
<Button fx:id="apply" defaultButton="true" layoutX="318.0" layoutY="336.0" prefHeight="25.0" prefWidth="100.0" text="Применить" />
</children>
</Pane>
</children>
<stylesheets>
<URL value="@options.css" />
</stylesheets>
</Pane>

View file

@ -8,20 +8,17 @@
<!-- DrLeonardo Design | Fixes by Yaroslavik -->
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.20"
xmlns:fx="http://javafx.com/fxml/1">
<children>
<ImageView id="spinner" fx:id="spinner" fitHeight="161.0" fitWidth="161.0" layoutX="213.0" layoutY="94.0"
y="-6.0">
<image>
<Image url="@../../images/icons/loading.gif"/>
</image>
</ImageView>
<!-- Description -->
<Label fx:id="description" alignment="CENTER" contentDisplay="CENTER" layoutX="152.0" layoutY="249.0"
prefHeight="64.0" prefWidth="283.0" text="..." textAlignment="CENTER"/>
</children>
<stylesheets>
<URL value="@processing.css"/>
</stylesheets>
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.20" xmlns:fx="http://javafx.com/fxml/1">
<children>
<ImageView id="spinner" fx:id="spinner" fitHeight="161.0" fitWidth="161.0" layoutX="213.0" layoutY="94.0" y="-6.0">
<image>
<Image url="@../../images/icons/loading.gif" />
</image>
</ImageView>
<!-- Description -->
<Label fx:id="description" alignment="CENTER" contentDisplay="CENTER" layoutX="152.0" layoutY="249.0" prefHeight="64.0" prefWidth="283.0" text="..." textAlignment="CENTER" />
</children>
<stylesheets>
<URL value="@processing.css" />
</stylesheets>
</Pane>

View file

@ -100,7 +100,7 @@ function makeProfilesRequest(callback) {
startTask(task);
}
function makeSetProfileRequest(profile, callback) {
var task = newRequestTask(new SetProfileRequest(profile));
var task = newRequestTask(new SetProfileRequest(Launcher.getConfig(), profile));
// Set task properties and start
processing.setTaskProperties(task, callback, function() {

View file

@ -13,70 +13,56 @@
<!-- DrLeonardo Design -->
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.20"
xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane id="holder" layoutX="1.0" layoutY="28.0" prefHeight="371.0" prefWidth="598.0">
<children>
<CheckBox fx:id="autoEnter" layoutX="14.0" layoutY="80.0" text="Автовход на сервер"/>
<Text fill="#8c8c8c" layoutX="38.0" layoutY="95.0" strokeType="OUTSIDE" strokeWidth="0.0"
text="Включение авто-входа означает что вы сразу после загрузки клиента попадете на сервер"
wrappingWidth="533.0000102519989" y="15.0"/>
<CheckBox fx:id="fullScreen" layoutX="13.0" layoutY="185.0" text="Клиент в полный экран"/>
<Text fill="#8c8c8c" layoutX="38.0" layoutY="200.0" strokeType="OUTSIDE" strokeWidth="0.0"
text="Включение данной функции позволяет запустить игру сразу в полноэкранном режиме"
wrappingWidth="533.0000102519989" y="15.0"/>
<CheckBox id="debug" layoutX="13.0" layoutY="124.0" text="Режим Отладки"/>
<Text fill="#8c8c8c" layoutX="38.0" layoutY="139.0" strokeType="OUTSIDE" strokeWidth="0.0"
text="Режим отладки позволяет просмотреть лог запуска и работы программы в реальном времени прямо из лаунчера, что упрощает поиск нужной информации"
wrappingWidth="533.0000016447157" y="15.0"/>
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.20" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane id="holder" layoutX="1.0" layoutY="28.0" prefHeight="371.0" prefWidth="598.0">
<children>
<CheckBox fx:id="autoEnter" layoutX="14.0" layoutY="80.0" text="Автовход на сервер" />
<Text fill="#8c8c8c" layoutX="38.0" layoutY="95.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение авто-входа означает что вы сразу после загрузки клиента попадете на сервер" wrappingWidth="533.0000102519989" y="15.0" />
<CheckBox fx:id="fullScreen" layoutX="13.0" layoutY="185.0" text="Клиент в полный экран" />
<Text fill="#8c8c8c" layoutX="38.0" layoutY="200.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение данной функции позволяет запустить игру сразу в полноэкранном режиме" wrappingWidth="533.0000102519989" y="15.0" />
<CheckBox id="debug" layoutX="13.0" layoutY="124.0" text="Режим Отладки" />
<Text fill="#8c8c8c" layoutX="38.0" layoutY="139.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Режим отладки позволяет просмотреть лог запуска и работы программы в реальном времени прямо из лаунчера, что упрощает поиск нужной информации" wrappingWidth="533.0000016447157" y="15.0" />
<!-- RAM settings -->
<TextFlow layoutX="128.0" layoutY="6.0">
<Text fx:id="ramLabel"/>
</TextFlow>
<Slider fx:id="ramSlider" layoutX="18.0" layoutY="26.0" prefHeight="3.0" prefWidth="563.0"/>
<Separator layoutY="65.0" prefHeight="1.0" prefWidth="598.0"/>
<!-- RAM settings -->
<!-- RAM settings -->
<TextFlow layoutX="128.0" layoutY="6.0">
<Text fx:id="ramLabel" />
</TextFlow>
<Slider fx:id="ramSlider" layoutX="18.0" layoutY="26.0" prefHeight="3.0" prefWidth="563.0" />
<Separator layoutY="65.0" prefHeight="1.0" prefWidth="598.0" />
<!-- RAM settings -->
<!-- Deldir settings -->
<Button fx:id="deleteDir" layoutX="15.0" layoutY="333.0" prefHeight="25.0" prefWidth="245.0"
text="Очистить данные игровых клиентов" textAlignment="CENTER" wrapText="true">
<font>
<Font name="System Bold" size="12.0"/>
</font>
</Button>
<!-- Deldir settings -->
<!-- Deldir settings -->
<Button fx:id="deleteDir" layoutX="15.0" layoutY="333.0" prefHeight="25.0" prefWidth="245.0" text="Очистить данные игровых клиентов" textAlignment="CENTER" wrapText="true">
<font>
<Font name="System Bold" size="12.0" />
</font>
</Button>
<!-- Deldir settings -->
<!-- Changedir settings -->
<Button fx:id="changeDir" layoutX="14.0" layoutY="229.0" prefHeight="25.0" prefWidth="200.0"
text="Сменить директорию загрузки" textAlignment="CENTER" wrapText="true"/>
<Hyperlink id="dirLabel" alignment="TOP_LEFT" layoutX="215.0" layoutY="230.0" prefHeight="23.0"
prefWidth="371.0" text="C:/Users" wrapText="true"/>
<!-- Changedir settings -->
<!-- Changedir settings -->
<Button fx:id="changeDir" layoutX="14.0" layoutY="229.0" prefHeight="25.0" prefWidth="200.0" text="Сменить директорию загрузки" textAlignment="CENTER" wrapText="true" />
<Hyperlink id="dirLabel" alignment="TOP_LEFT" layoutX="215.0" layoutY="230.0" prefHeight="23.0" prefWidth="371.0" text="C:/Users" wrapText="true" />
<!-- Changedir settings -->
<Button fx:id="apply" defaultButton="true" layoutX="486.0" layoutY="335.0" prefHeight="23.0"
prefWidth="100.0" text="Применить"/>
<Text layoutX="17.0" layoutY="19.0">Выделение памяти:</Text>
<Pane fx:id="transferDialog" prefHeight="371.0" prefWidth="598.0">
<children>
<Text fill="WHITE" layoutX="99.0" layoutY="155.0" strokeType="OUTSIDE" strokeWidth="0.0"
text="Перенести все данные в новую директорию?" wrappingWidth="400.13671875">
<font>
<Font size="19.0"/>
</font>
</Text>
<Button fx:id="applyTransfer" layoutX="130.0" layoutY="186.0" mnemonicParsing="false"
prefHeight="25.0" prefWidth="124.0" text="Да, перенести!"/>
<Button fx:id="cancelTransfer" layoutX="344.0" layoutY="186.0" mnemonicParsing="false"
prefHeight="25.0" prefWidth="124.0" text="Нет, не нужно."/>
</children>
</Pane>
<Button fx:id="apply" defaultButton="true" layoutX="486.0" layoutY="335.0" prefHeight="23.0" prefWidth="100.0" text="Применить" />
<Text layoutX="17.0" layoutY="19.0">Выделение памяти: </Text>
<Pane fx:id="transferDialog" prefHeight="371.0" prefWidth="598.0">
<children>
<Text fill="WHITE" layoutX="99.0" layoutY="155.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Перенести все данные в новую директорию?" wrappingWidth="400.13671875">
<font>
<Font size="19.0" />
</font>
</Text>
<Button fx:id="applyTransfer" layoutX="130.0" layoutY="186.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="124.0" text="Да, перенести!" />
<Button fx:id="cancelTransfer" layoutX="344.0" layoutY="186.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="124.0" text="Нет, не нужно." />
</children>
</Pane>
</children>
</Pane>
</children>
<stylesheets>
<URL value="@settings.css"/>
</stylesheets>
</children>
</Pane>
</children>
<stylesheets>
<URL value="@settings.css" />
</stylesheets>
</Pane>

View file

@ -10,38 +10,34 @@
<!-- DrLeonardo Design -->
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.20"
xmlns:fx="http://javafx.com/fxml/1">
<children>
<ImageView fitHeight="400.0" fitWidth="600.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../images/background.png"/>
</image>
</ImageView>
<Pane layoutY="28.0" prefHeight="372.0" prefWidth="600.0" styleClass="downloadPane"/>
<ImageView fitHeight="12.0" fitWidth="11.0" layoutX="9.0" layoutY="8.0">
<image>
<Image url="@../../images/icons/logo_small.png"/>
</image>
</ImageView>
<Label fx:id="description" layoutX="12.0" layoutY="267.0" prefHeight="98.0" prefWidth="576.0" text="..."
textFill="WHITE"/>
<ProgressBar fx:id="progress" disable="false" layoutX="-1.0" layoutY="376.0" opacity="1.0" prefHeight="24.0"
prefWidth="600.0" progress="1.0" style=""/>
<!-- Update controls -->
<Label fx:id="utitle" alignment="TOP_LEFT" layoutX="15.0" layoutY="236.0" prefHeight="30.0" prefWidth="470.0"
text="Обновление..." textFill="WHITE">
<font>
<Font name="System Bold" size="20.0"/>
</font>
</Label>
<ImageView fitHeight="160.0" fitWidth="160.0" layoutX="219.0" layoutY="70.0" y="-6.0">
<image>
<Image url="@../../images/icons/loading.gif"/>
</image>
</ImageView>
</children>
<stylesheets>
<URL value="@update.css"/>
</stylesheets>
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.20" xmlns:fx="http://javafx.com/fxml/1">
<children>
<ImageView fitHeight="400.0" fitWidth="600.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../images/background.png" />
</image>
</ImageView>
<Pane layoutY="28.0" prefHeight="372.0" prefWidth="600.0" styleClass="downloadPane" />
<ImageView fitHeight="12.0" fitWidth="11.0" layoutX="9.0" layoutY="8.0">
<image>
<Image url="@../../images/icons/logo_small.png" />
</image>
</ImageView>
<Label fx:id="description" layoutX="12.0" layoutY="267.0" prefHeight="98.0" prefWidth="576.0" text="..." textFill="WHITE" />
<ProgressBar fx:id="progress" disable="false" layoutX="-1.0" layoutY="376.0" opacity="1.0" prefHeight="24.0" prefWidth="600.0" progress="1.0" style="" />
<!-- Update controls -->
<Label fx:id="utitle" alignment="TOP_LEFT" layoutX="15.0" layoutY="236.0" prefHeight="30.0" prefWidth="470.0" text="Обновление..." textFill="WHITE">
<font>
<Font name="System Bold" size="20.0" />
</font>
</Label>
<ImageView fitHeight="160.0" fitWidth="160.0" layoutX="219.0" layoutY="70.0" y="-6.0">
<image>
<Image url="@../../images/icons/loading.gif" />
</image>
</ImageView>
</children>
<stylesheets>
<URL value="@update.css" />
</stylesheets>
</Pane>

View file

@ -0,0 +1,324 @@
/*-- DrLeonardo Design --*/
Button, CheckBox, ComboBox, RadioButton {
-fx-cursor: hand;
}
/* Background */
#layout {
-fx-background-color: transparent;
-fx-background-size: cover;
-fx-pref-width: 738px;
-fx-pref-height: 425px;
-fx-background-image: url('images/background.jpg');
}
/* Mask */
#mask {
-fx-background-color: rgba(0, 0, 0, 0.5);
-fx-pref-width: 693px;
-fx-pref-height: 425px;
}
/** Errors **/
#errormessage{
-fx-background-color: transparent;
-fx-text-alignment: center;
-fx-text-fill: #CE5757;
}
.error{
-fx-text-fill: #CE5757;
}
/* bars */
#bar {
-fx-background-color: #323232;
-fx-pref-width: 45px;
-fx-pref-height: 425px;
}
/** buttons in bar **/
#close {
-fx-background-position: center;
-jfx-button-type: FLAT;
-fx-background-repeat: no-repeat;
-fx-background-image: url('images/icons/close.png');
-fx-background-radius: 0;
-fx-background-color: #CE5757;
-fx-pref-width: 45px;
-fx-pref-height: 45px;
}
#hide {
-fx-background-position: center;
-jfx-button-type: FLAT;
-fx-background-repeat: no-repeat;
-fx-background-color: #323232;
-fx-background-radius: 0;
-fx-background-image: url('images/icons/hide.png');
-fx-pref-width: 45px;
-fx-pref-height: 45px;
}
#settings {
-fx-background-position: center;
-jfx-button-type: FLAT;
-fx-background-repeat: no-repeat;
-fx-background-color: #323232;
-fx-background-radius: 0;
-fx-background-image: url('images/icons/settings.png');
-fx-pref-width: 45px;
-fx-pref-height: 45px;
}
#logout {
-fx-background-position: center;
-fx--button-type: FLAT;
-fx-background-repeat: no-repeat;
-fx-background-color: #323232;
-fx-background-radius: 0;
-fx-background-image: url('images/icons/exit.png');
-fx-pref-width: 45px;
-fx-pref-height: 45px;
}
#discord {
-fx-background-position: center;
-jfx-button-type: FLAT;
-fx-background-repeat: no-repeat;
-fx-background-color: #323232;
-fx-background-radius: 0;
-fx-background-image: url('images/icons/discord.png');
-fx-pref-width: 45px;
-fx-pref-height: 45px;
}
#close:hover, #close:pressed { -fx-background-color: #DB5252; }
#hide:hover, #hide:pressed, #discord:hover, #discord:pressed, #settings:hover, #settings:pressed, #logout:hover, #logout:pressed { -fx-background-color: #3d3d3d; }
/* LoginMenu */
#authPane {
-fx-background-color: rgba(255, 255, 255, 0.71);
-fx-pref-width: 270px;
-fx-pref-height: 425px;
}
#logo {
-fx-background-image: url('images/icons/logo.png');
-fx-background-repeat: no-repeat;
-fx-pref-width: 125px;
-fx-pref-height: 32px;
}
/** Buttons & textarea**/
.auth {
-jfx-button-type: FLAT;
-fx-font-weight: bold;
-fx-font-size: 13pt;
-fx-background-radius: 0;
-fx-background-color: #61B373;
-fx-text-fill: #ffffff;
-fx-pref-width: 240px;
-fx-pref-height: 45px;
}
.auth:hover, .auth:pressed { -fx-background-color: #74C085; }
#password, #login {
-fx-background-radius: 0;
-fx-pref-width: 200px;
-fx-pref-height: 30px;
}
.text-input{
-fx-focus-color: transparent;
-fx-background-repeat: no-repeat;
-fx-text-fill: #909090;
-fx-prompt-text-fill: #909090;
-fx-background-color: transparent;
-fx-font-family: "Segoe UI";
-fx-font-size: 13px;
-fx-font-weight: bold;
}
/** Hyperlink **/
#link {
-fx-font-weight: bold;
-fx-font-size: 7pt;
-fx-opacity: 0.5;
-fx-text-fill: #323232;
-fx-pref-width: 80px;
-fx-pref-height: 17px;
}
#link:hover, #link:pressed { -fx-opacity: 0.8; }
/** CheckBox & ComboBox**/
#rememberchb{
-fx-font-size: 13;
-fx-text-fill: #909090;
-fx-pref-width: 145px;
-fx-pref-height: 30px;
}
#combologin {
-fx-text-fill: #909090;
-fx-pref-width: 200px;
-fx-pref-height: 30px;
}
/** web**/
#news {
-fx-background-color: transparent;
-fx-pref-width: 423px;
-fx-pref-height: 425px;
}
/* MenuPane */
.serverentrance {
-fx-background-color: rgba(255, 255, 255, 0.71);
-fx-pref-width: 387px;
-fx-pref-height: 425px;
}
/** buttons **/
.clientLaunch{
-jfx-button-type: FLAT;
-fx-font-weight: bold;
-fx-font-size: 18pt;
-fx-background-radius: 0;
-fx-background-color: #61B373;
-fx-text-fill: #ffffff;
-fx-pref-width: 260px;
-fx-pref-height: 45px;
}
.clientSettings{
-fx-background-position: center;
-jfx-button-type: FLAT;
-fx-background-repeat: no-repeat;
-fx-background-color: #61B373;
-fx-background-radius: 0;
-fx-pref-width: 85px;
-fx-pref-height: 51px;
-fx-background-image: url('images/icons/options.png');
}
.clientLaunch:hover, .clientLaunch:pressed, .clientSettings:hover, .clientSettings:pressed { -fx-background-color: #74C085; }
/* Scrolls */
.scroll-pane {
-fx-background-color: transparent;
}
.scroll-bar:horizontal,
.scroll-bar:vertical {
-fx-background-color: transparent;
}
.increment-button,
.decrement-button,
.increment-arrow,
.decrement-arrow {
-fx-background-color: transparent;
-fx-border-color: transparent;
}
.scroll-bar:horizontal .track,
.scroll-bar:vertical .track {
-fx-background-color: transparent;
-fx-border-color: transparent;
}
.scroll-bar:horizontal .thumb,
.scroll-bar:vertical .thumb {
-fx-background-color: rgba(0, 0, 0, 0.19);
-fx-background-radius: 0;
}
.scroll-bar {
-fx-font-size: 6px;
}
.scroll-pane>.corner {
-fx-background-color: black;
}
/* Server buttons */
.server-button {
-jfx-button-type: FLAT;
-fx-font-weight: bold;
-fx-font-size: 16pt;
-fx-background-radius: 0;
-fx-alignment: CENTER-LEFT;
-fx-padding: 0 0 0 75;
-fx-font-family: "Segoe UI";
-fx-text-fill: #fff;
-fx-pref-width: 282px;
-fx-pref-height: 75px;
}
.server-button:selected {
-fx-border-width: 0 0 0 5;
-fx-border-style: none none none solid;
-fx-border-color: #323232;
}
/** Server custom buttons **/
/** server-button-<your profile name> **/
.server-icon-Example {
-fx-background-image: url('images/icons/example.png');
}
.server-icon-Example2 {
-fx-background-image: url('images/icons/example2.png');
}
.server-button-Example {
-fx-background-image: url('images/servers/example.png');
}
.server-button-Example2 {
-fx-background-image: url('images/servers/example2.png');
}
/* Labels */
#serverLabel{
-fx-text-fill: #323232;
-fx-padding: 0 0 0 14;
-fx-pref-width: 265px;
-fx-pref-height: 25px;
}
#serverStatus{
-fx-text-fill: #323232;
-fx-pref-width: 60px;
-fx-pref-height: 25px;
}
#serverlist{
-fx-background-color: transparent;
}
#serverlist > .viewport {
-fx-background-color: transparent;
}
#serverdesc{
-fx-background-color: transparent;
}
#serverdesc > .viewport {
-fx-background-color: transparent;
}
#serverinfo{
-fx-background-color: transparent;
}
#serverinfo > .viewport {
-fx-background-color: transparent;
}
#servercontainer{
-fx-background-color: transparent;
-jfx-button-type: FLAT;
-fx-pref-width: 282px;
-fx-pref-height: 75px;
}
.toggle-button:disabled{
-fx-opacity: 1.0;
}
.heading{
-fx-text-fill: #555555;
}
/*-- DrLeonardo Design --*/

View file

@ -17,6 +17,7 @@ var ServerPinger = ServerPingerClass.static;
var Request = RequestClass.static;
var RequestType = RequestTypeClass.static;
var RequestException = RequestExceptionClass.static;
var CustomRequest = CustomRequestClass.static;
var PingRequest = PingRequestClass.static;
var AuthRequest = AuthRequestClass.static;
var JoinServerRequest = JoinServerRequestClass.static;

View file

@ -1,7 +1,6 @@
var app, stage, scene, loginScene, menuScene;
var rootPane, loginPane, authPane, menuPane;
// Override application class
var LauncherApp = Java.extend(JSApplication, {
init: function() {
app = JSApplication.getInstance();
@ -14,13 +13,11 @@ var LauncherApp = Java.extend(JSApplication, {
stage.setResizable(false);
stage.setTitle(config.title);
// Set icons
config.icons.forEach(function(icon) {
var iconURL = Launcher.getResourceURL(icon).toString();
stage.getIcons().add(new javafx.scene.image.Image(iconURL));
});
// Load launcher FXML
loginPane = loadFXML("dialog/login.fxml");
menuPane = loadFXML("dialog/mainmenu.fxml");
@ -31,7 +28,6 @@ var LauncherApp = Java.extend(JSApplication, {
menuScene.setFill(javafx.scene.paint.Color.TRANSPARENT);
setCurrentScene(loginScene);
initLauncher();
}, stop: function() {
@ -40,7 +36,6 @@ var LauncherApp = Java.extend(JSApplication, {
}
});
// Helper functions
function loadFXML(name) {
var loader = new javafx.fxml.FXMLLoader(Launcher.getResourceURL(name));
loader.setCharset(IOHelper.UNICODE_CHARSET);
@ -59,15 +54,13 @@ function setRootParent(parent) {
scene.setRoot(parent);
}
// Start function - there all begins
function start(args) {
// Set font rendering properties
LogHelper.debug("Setting FX properties");
java.lang.System.setProperty("prism.lcdtext", "false");
// Start laucher JavaFX stage
LogHelper.debug("Launching JavaFX application");
javafx.application.Application.launch(LauncherApp.class, args);
}
launcher.loadScript("dialog/dialog.js");