diff --git a/Launcher/runtime/dialog/console.fxml b/Launcher/runtime/dialog/console.fxml
deleted file mode 100644
index 1890848f..00000000
--- a/Launcher/runtime/dialog/console.fxml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js
index a3981c87..e85546bf 100644
--- a/Launcher/runtime/dialog/dialog.js
+++ b/Launcher/runtime/dialog/dialog.js
@@ -1,4 +1,4 @@
-var authPane, dimPane, serverPane, bar;
+var authPane, dimPane, serverPane, bar, optionsPane, consolePane;
var loginField, passwordField, savePasswordBox;
var serverList, serverInfo, serverDescription, serverEntrance, serverLabel, serverStatus;
var profilesList = [];
@@ -10,17 +10,18 @@ function initLauncher() {
initLoginScene();
initMenuScene();
initConsoleScene();
+ initOptionsScene();
+ /* ======== init Overlays ======== */
debug.initOverlay();
processing.initOverlay();
settingsOverlay.initOverlay();
update.initOverlay();
- options.initOverlay();
verifyLauncher();
}
-/* ======== init Login ======== */
+/* ======== init Login window======== */
function initLoginScene() {
loginPane.setOnMousePressed(function(event){ movePoint = new javafx.geometry.Point2D(event.getSceneX(), event.getSceneY())});
loginPane.setOnMouseDragged(function(event) {
@@ -41,14 +42,14 @@ function initLoginScene() {
authPane = pane;
loginField = pane.lookup("#login");
- loginField.setOnMouseMoved(function(event){rootPane.fireEvent(event)});
+ loginField.setOnMouseMoved(function(event){rootPane.fireEvent(event)});
loginField.setOnAction(goAuth);
if (settings.login !== null) {
loginField.setText(settings.login);
}
passwordField = pane.lookup("#password");
- passwordField.setOnMouseMoved(function(event){rootPane.fireEvent(event)});
+ passwordField.setOnMouseMoved(function(event){rootPane.fireEvent(event)});
passwordField.setOnAction(goAuth);
if (settings.rsaPassword !== null) {
passwordField.getStyleClass().add("hasSaved");
@@ -65,7 +66,7 @@ function initLoginScene() {
pane.lookup("#goAuth").setOnAction(goAuth);
}
-/* ======== init Menu ======== */
+/* ======== init Menu window======== */
function initMenuScene() {
menuPane.setOnMousePressed(function(event){ movePoint = new javafx.geometry.Point2D(event.getSceneX(), event.getSceneY())});
menuPane.setOnMouseDragged(function(event) {
@@ -95,7 +96,6 @@ function initMenuScene() {
serverList = pane.lookup("#serverlist").getContent();
serverInfo = pane.lookup("#serverinfo").getContent();
serverDescription = serverInfo.lookup("#serverDescription");
-
serverEntrance = pane.lookup("#serverentrance");
serverStatus = serverEntrance.lookup("#serverStatus");
serverLabel = serverEntrance.lookup("#serverLabel");
@@ -105,10 +105,10 @@ function initMenuScene() {
}
-/* ======== init Console ======== */
+/* ======== init Console window======== */
function initConsoleScene() {
- consolePane.setOnMousePressed(function(event){ movePoint = new javafx.geometry.Point2D(event.getSceneX(), event.getSceneY())});
- consolePane.setOnMouseDragged(function(event) {
+ consoleMenu.setOnMousePressed(function(event){ movePoint = new javafx.geometry.Point2D(event.getSceneX(), event.getSceneY())});
+ consoleMenu.setOnMouseDragged(function(event) {
if(movePoint === null) {
return;
}
@@ -117,18 +117,38 @@ function initConsoleScene() {
stage.setY(event.getScreenY() - movePoint.getY());
});
- var pane = consolePane.lookup("#bar");
+ var pane = consoleMenu.lookup("#bar");
bar = pane;
- consolePane.lookup("#close").setOnAction(function(event){ javafx.application.Platform.exit()});
- consolePane.lookup("#hide").setOnAction(function(event){ stage.setIconified(true)});
- consolePane.lookup("#back").setOnAction(function(){
+ pane.lookup("#close").setOnAction(function(event){ javafx.application.Platform.exit()});
+ pane.lookup("#hide").setOnAction(function(event){ stage.setIconified(true)});
+ pane.lookup("#back").setOnAction(function(){
setCurrentScene(menuScene);
});
- var pane = consolePane.lookup("#consolePane");
+ var pane = consoleMenu.lookup("#consolePane");
consolePane = pane;
+}
+/* ======== init Options window======== */
+function initOptionsScene() {
+ optionsMenu.setOnMousePressed(function(event){ movePoint = new javafx.geometry.Point2D(event.getSceneX(), event.getSceneY())});
+ optionsMenu.setOnMouseDragged(function(event) {
+ if(movePoint === null) {
+ return;
+ }
+
+ stage.setX(event.getScreenX() - movePoint.getX());
+ stage.setY(event.getScreenY() - movePoint.getY());
+ });
+
+ var pane = optionsMenu.lookup("#bar");
+ bar = pane;
+ pane.lookup("#close").setOnAction(function(event){ javafx.application.Platform.exit()});
+ pane.lookup("#hide").setOnAction(function(event){ stage.setIconified(true)});
+ pane.lookup("#back").setOnAction(function(){
+ setCurrentScene(menuScene);
+ });
}
/* ======== init Offline ======== */
@@ -149,7 +169,7 @@ function initOffline() {
function goAuth(event) {
if (overlay.current !== null) {
return;
- }
+ }
var login = loginField.getText();
if (login.isEmpty()) {
@@ -176,32 +196,23 @@ function goAuth(event) {
/* ======== Console ======== */
function goConsole(event) {
- if (overlay.current !== null) {
- return;
- }
+ setCurrentScene(consoleScene);
}
/* ======== Settings ======== */
function goSettings(event) {
- // Verify there's no other overlays
if (overlay.current !== null) {
return;
}
- // Show settings overlay
overlay.show(settingsOverlay.overlay, null);
}
/* ======== Options ======== */
function goOptions(event) {
- // Verify there's no other overlays
- if (overlay.current !== null) {
- return;
- }
+ setCurrentScene(optionsScene);
- // Show options overlay
options.update();
- overlay.show(options.overlay, null);
}
/* ======== Processing functions ======== */
@@ -210,19 +221,17 @@ function verifyLauncher(e) {
overlay.show(processing.overlay, function(event) makeLauncherRequest(function(result) {
settings.lastDigest = result.digest;
processing.resetOverlay();
- // Init offline if set
if (settings.offline) {
- initOffline();
+ initOffline();
}
overlay.swap(0, processing.overlay, function(event) makeProfilesRequest(function(result) {
settings.lastProfiles = result.profiles;
- // Update profiles list and hide overlay
updateProfilesList(result.profiles);
options.load();
overlay.hide(0, function() {
- if (cliParams.autoLogin) {
- goAuth(null);
- }
+ if (cliParams.autoLogin) {
+ goAuth(null);
+ }
});
}));
}));
@@ -245,37 +254,37 @@ function doAuth(login, rsaPassword) {
}
function doUpdate(profile, pp, accessToken) {
-var digest = profile.isUpdateFastCheck();
+ var digest = profile.isUpdateFastCheck();
overlay.swap(0, update.overlay, function(event) {
- update.resetOverlay("Обновление файлов ресурсов");
- var assetDirName = profile.getAssetDir();
- var assetDir = settings.updatesDir.resolve(assetDirName);
- var assetMatcher = profile.getAssetUpdateMatcher();
- makeSetProfileRequest(profile, function() {
- ClientLauncher.setProfile(profile);
- makeUpdateRequest(assetDirName, assetDir, assetMatcher, digest, function(assetHDir) {
- settings.lastHDirs.put(assetDirName, assetHDir.hdir);
+ update.resetOverlay("Обновление файлов ресурсов");
+ var assetDirName = profile.getAssetDir();
+ var assetDir = settings.updatesDir.resolve(assetDirName);
+ var assetMatcher = profile.getAssetUpdateMatcher();
+ makeSetProfileRequest(profile, function() {
+ ClientLauncher.setProfile(profile);
+ makeUpdateRequest(assetDirName, assetDir, assetMatcher, digest, function(assetHDir) {
+ settings.lastHDirs.put(assetDirName, assetHDir.hdir);
- update.resetOverlay("Обновление файлов клиента");
- var clientDirName = profile.getDir();
- var clientDir = settings.updatesDir.resolve(clientDirName);
- var clientMatcher = profile.getClientUpdateMatcher();
- makeUpdateRequest(clientDirName, clientDir, clientMatcher, digest, function(clientHDir) {
- settings.lastHDirs.put(clientDirName, clientHDir.hdir);
- doLaunchClient(assetDir, assetHDir.hdir, clientDir, clientHDir.hdir, profile, pp, accessToken);
- });
+ update.resetOverlay("Обновление файлов клиента");
+ var clientDirName = profile.getDir();
+ var clientDir = settings.updatesDir.resolve(clientDirName);
+ var clientMatcher = profile.getClientUpdateMatcher();
+ makeUpdateRequest(clientDirName, clientDir, clientMatcher, digest, function(clientHDir) {
+ settings.lastHDirs.put(clientDirName, clientHDir.hdir);
+ doLaunchClient(assetDir, assetHDir.hdir, clientDir, clientHDir.hdir, profile, pp, accessToken);
});
});
+ });
});
}
function doLaunchClient(assetDir, assetHDir, clientDir, clientHDir, profile, pp, accessToken) {
processing.resetOverlay();
overlay.swap(0, processing.overlay, function(event)
- launchClient(assetHDir, clientHDir, profile, new ClientLauncherParams(settings.lastDigest,
- assetDir, clientDir, pp, accessToken, settings.autoEnter, settings.fullScreen, settings.ram, 0, 0), doDebugClient)
- );
+ launchClient(assetHDir, clientHDir, profile, new ClientLauncherParams(settings.lastDigest,
+ assetDir, clientDir, pp, accessToken, settings.autoEnter, settings.fullScreen, settings.ram, 0, 0), doDebugClient)
+);
}
function doDebugClient(process) {
@@ -317,8 +326,8 @@ function updateProfilesList(profiles) {
});
LogHelper.debug("Load selected %d profile",settings.profile);
if(profiles.length > 0) {
- if(settings.profile >= profiles.length)
- settings.profile = profiles.length-1;
+ if(settings.profile >= profiles.length)
+ settings.profile = profiles.length-1;
serverHolder.set(serverList.getChildren().get(settings.profile));
}
}
@@ -433,9 +442,11 @@ var serverHolder = {
}
};
-/* ======== Overlay scripts ======== */
+/* ======== Scenes scripts ======== */
launcher.loadScript("dialog/overlay/debug/debug.js");
launcher.loadScript("dialog/overlay/processing/processing.js");
launcher.loadScript("dialog/overlay/settings/settings.js");
-launcher.loadScript("dialog/overlay/options/options.js");
-launcher.loadScript("dialog/overlay/update/update.js");
\ No newline at end of file
+launcher.loadScript("dialog/overlay/update/update.js");
+
+/* ======== Overlays scripts ======== */
+launcher.loadScript("dialog/scenes/options/options.js");
diff --git a/Launcher/runtime/dialog/images/icons/back.png b/Launcher/runtime/dialog/images/icons/back.png
deleted file mode 100644
index a9ce690c..00000000
Binary files a/Launcher/runtime/dialog/images/icons/back.png and /dev/null differ
diff --git a/Launcher/runtime/dialog/images/icons/close.png b/Launcher/runtime/dialog/images/icons/close.png
deleted file mode 100644
index a889d2d2..00000000
Binary files a/Launcher/runtime/dialog/images/icons/close.png and /dev/null differ
diff --git a/Launcher/runtime/dialog/images/icons/console.png b/Launcher/runtime/dialog/images/icons/console.png
deleted file mode 100644
index 29ba8cb3..00000000
Binary files a/Launcher/runtime/dialog/images/icons/console.png and /dev/null differ
diff --git a/Launcher/runtime/dialog/images/icons/discord.png b/Launcher/runtime/dialog/images/icons/discord.png
deleted file mode 100644
index 5456b89f..00000000
Binary files a/Launcher/runtime/dialog/images/icons/discord.png and /dev/null differ
diff --git a/Launcher/runtime/dialog/images/icons/exit.png b/Launcher/runtime/dialog/images/icons/exit.png
deleted file mode 100644
index 19ce8f5f..00000000
Binary files a/Launcher/runtime/dialog/images/icons/exit.png and /dev/null differ
diff --git a/Launcher/runtime/dialog/images/icons/hide.png b/Launcher/runtime/dialog/images/icons/hide.png
deleted file mode 100644
index 5224c1d2..00000000
Binary files a/Launcher/runtime/dialog/images/icons/hide.png and /dev/null differ
diff --git a/Launcher/runtime/dialog/images/icons/options.png b/Launcher/runtime/dialog/images/icons/options.png
deleted file mode 100644
index db01f3e2..00000000
Binary files a/Launcher/runtime/dialog/images/icons/options.png and /dev/null differ
diff --git a/Launcher/runtime/dialog/images/icons/settings.png b/Launcher/runtime/dialog/images/icons/settings.png
deleted file mode 100644
index 2d733612..00000000
Binary files a/Launcher/runtime/dialog/images/icons/settings.png and /dev/null differ
diff --git a/Launcher/runtime/dialog/images/servers/example.png b/Launcher/runtime/dialog/images/servers/example.png
index 904e2a41..a233b839 100644
Binary files a/Launcher/runtime/dialog/images/servers/example.png and b/Launcher/runtime/dialog/images/servers/example.png differ
diff --git a/Launcher/runtime/dialog/images/servers/example2.png b/Launcher/runtime/dialog/images/servers/example2.png
deleted file mode 100644
index e27e2fc8..00000000
Binary files a/Launcher/runtime/dialog/images/servers/example2.png and /dev/null differ
diff --git a/Launcher/runtime/dialog/overlay/debug/debug.fxml b/Launcher/runtime/dialog/overlay/debug/debug.fxml
index f8b4e1f2..8411c831 100644
--- a/Launcher/runtime/dialog/overlay/debug/debug.fxml
+++ b/Launcher/runtime/dialog/overlay/debug/debug.fxml
@@ -3,6 +3,7 @@
+
@@ -14,7 +15,10 @@
-
-
-
+
+
+
+
+
+
diff --git a/Launcher/runtime/dialog/overlay/options/options.css b/Launcher/runtime/dialog/overlay/options/options.css
deleted file mode 100644
index d610c7b0..00000000
--- a/Launcher/runtime/dialog/overlay/options/options.css
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-- DrLeonardo Design --*/
-#holder {
- -fx-background-color: #fff;
-}
-
-/* Labels */
-#holder > #settingsTitle {
- -fx-font-size: 14pt;
- -fx-alignment: baseline-center;
-}
-
-#holder > #apply{
- -fx-background-color: #61B373;
- -fx-background-radius: 0;
- -fx-text-fill: white;
- -fx-background-position: center;
- -jfx-button-type: FLAT;
- -fx-pref-width: 150px;
- -fx-pref-height: 25px;
-}
-#holder > #apply:hover,
-#holder > #apply:focused{
- -fx-background-color: #74C085;
-}
-
-#holder > #modlist {
- -fx-background-color: transparent;
-
-}
-#holder > #modlist > .viewport {
- -fx-background-color: transparent;
-}
-
-.description-text {
- -fx-font-smoothing-type: lcd;
- -fx-fill: #8c8c8c;
- -fx-font-size: 12px;
-}
-.separator *.line {
- -fx-border-color: transparent;
- -fx-border-width: 0 0 10 0;
-}
-/*-- DrLeonardo Design --*/
\ No newline at end of file
diff --git a/Launcher/runtime/dialog/overlay/options/options.fxml b/Launcher/runtime/dialog/overlay/options/options.fxml
deleted file mode 100644
index 1b0538cc..00000000
--- a/Launcher/runtime/dialog/overlay/options/options.fxml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Launcher/runtime/dialog/overlay/processing/processing.fxml b/Launcher/runtime/dialog/overlay/processing/processing.fxml
index bf96e00b..8e40a15c 100644
--- a/Launcher/runtime/dialog/overlay/processing/processing.fxml
+++ b/Launcher/runtime/dialog/overlay/processing/processing.fxml
@@ -7,7 +7,7 @@
-
+
diff --git a/Launcher/runtime/dialog/overlay/processing/processing.js b/Launcher/runtime/dialog/overlay/processing/processing.js
index 5ab6ab02..abc10fd8 100644
--- a/Launcher/runtime/dialog/overlay/processing/processing.js
+++ b/Launcher/runtime/dialog/overlay/processing/processing.js
@@ -5,17 +5,14 @@ var processing = {
initOverlay: function() {
processing.overlay = loadFXML("dialog/overlay/processing/processing.fxml");
- // Lookup nodes
processing.spinner = processing.overlay.lookup("#spinner");
processing.description = processing.overlay.lookup("#description");
- // Set images
processing.errorImage = new javafx.scene.image.Image(
Launcher.getResourceURL("dialog/images/icons/error.png").toString());
},
- resetOverlay: function() {//JFXSpinner spinner = new JFXSpinner();
- //processing.spinner.setImage(processing.processingImage);
+ resetOverlay: function() {
processing.description.getStyleClass().remove("error");
processing.description.setText("...");
},
diff --git a/Launcher/runtime/dialog/overlay/settings/settings.fxml b/Launcher/runtime/dialog/overlay/settings/settings.fxml
index aa2a6430..a753d4a8 100644
--- a/Launcher/runtime/dialog/overlay/settings/settings.fxml
+++ b/Launcher/runtime/dialog/overlay/settings/settings.fxml
@@ -7,6 +7,7 @@
+
@@ -17,33 +18,23 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
-
-
-
+
Выделение памяти:
-
+
@@ -55,7 +46,7 @@
-
+
diff --git a/Launcher/runtime/dialog/scenes/console/console.fxml b/Launcher/runtime/dialog/scenes/console/console.fxml
new file mode 100644
index 00000000..0069fee6
--- /dev/null
+++ b/Launcher/runtime/dialog/scenes/console/console.fxml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Launcher/runtime/dialog/login.fxml b/Launcher/runtime/dialog/scenes/login/login.fxml
similarity index 58%
rename from Launcher/runtime/dialog/login.fxml
rename to Launcher/runtime/dialog/scenes/login/login.fxml
index 67bcb8a1..5d7f647d 100644
--- a/Launcher/runtime/dialog/login.fxml
+++ b/Launcher/runtime/dialog/scenes/login/login.fxml
@@ -6,6 +6,7 @@
+
@@ -27,16 +28,28 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/Launcher/runtime/dialog/mainmenu.fxml b/Launcher/runtime/dialog/scenes/mainmenu/mainmenu.fxml
similarity index 66%
rename from Launcher/runtime/dialog/mainmenu.fxml
rename to Launcher/runtime/dialog/scenes/mainmenu/mainmenu.fxml
index 931d0ac5..bfbd9238 100644
--- a/Launcher/runtime/dialog/mainmenu.fxml
+++ b/Launcher/runtime/dialog/scenes/mainmenu/mainmenu.fxml
@@ -1,6 +1,8 @@
+
+
@@ -18,7 +20,7 @@
-
+
@@ -47,13 +49,16 @@
-
+
+
+
+
-