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/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 @@ - + + + + - - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + diff --git a/Launcher/runtime/dialog/scenes/options/options.fxml b/Launcher/runtime/dialog/scenes/options/options.fxml new file mode 100644 index 00000000..301cb3bd --- /dev/null +++ b/Launcher/runtime/dialog/scenes/options/options.fxml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Launcher/runtime/dialog/overlay/options/options.js b/Launcher/runtime/dialog/scenes/options/options.js similarity index 85% rename from Launcher/runtime/dialog/overlay/options/options.js rename to Launcher/runtime/dialog/scenes/options/options.js index 92979181..32a6fa28 100644 --- a/Launcher/runtime/dialog/overlay/options/options.js +++ b/Launcher/runtime/dialog/scenes/options/options.js @@ -73,24 +73,21 @@ var options = { }); }, - /* ===================== OVERLAY ===================== */ count: 0, - initOverlay: function() { - options.overlay = loadFXML("dialog/overlay/options/options.fxml"); - var holder = options.overlay.lookup("#holder"); - holder.lookup("#apply").setOnAction(function(event) overlay.hide(0, null)); - }, update: function() { - var holder = options.overlay.lookup("#modlist").getContent(); + var pane = optionsMenu.lookup("#optionsPane"); + optionsPane = pane; + + var modlist = pane.lookup("#modlist").getContent(); var nodelist = new java.util.ArrayList; - holder.getChildren().forEach(function(node,i,arr) { + modlist.getChildren().forEach(function(node,i,arr) { if(node instanceof com.jfoenix.controls.JFXCheckBox) nodelist.add(node); }); nodelist.forEach(function(node,i,arr) { - holder.getChildren().remove(node); + modlist.getChildren().remove(node); }); var profile = profilesList[serverHolder.old]; var list = profile.getOptional(); @@ -108,14 +105,14 @@ var options = { LogHelper.debug("optionalMod %s permissions deny",modFile.name); return; } - if(modFile.info != null) //Есть ли описание? + if(modFile.info != null) modDescription = modFile.info; - if(modFile.subTreeLevel != null && modFile.subTreeLevel > 1)//Это суб-модификация? + if(modFile.subTreeLevel != null && modFile.subTreeLevel > 1) subLevel = modFile.subTreeLevel; var testMod = new com.jfoenix.controls.JFXCheckBox(modName); if(subLevel > 1) - for(var i = 1; i < subLevel; i++)//Выделение субмодификаций сдвигом. + for(var i = 1; i < subLevel; i++) testMod.setTranslateX(25*i); testMod.setSelected(modFile.mark); @@ -134,15 +131,15 @@ var options = { options.update(); }); checkBoxList.add(testMod); - if(modDescription != "") { //Добавляем описание? + if(modDescription != "") { textDescr = new javafx.scene.text.Text(modDescription); if(subLevel > 1) { for(var i = 1; i < subLevel; i++){ - textDescr.setWrappingWidth(640-(25*i)); + textDescr.setWrappingWidth(630-(25*i)); textDescr.setTranslateX(25+(25*i)); } } else { - textDescr.setWrappingWidth(640); + textDescr.setWrappingWidth(630); textDescr.setTranslateX(25); } textDescr.setTextAlignment(javafx.scene.text.TextAlignment.JUSTIFY); @@ -153,7 +150,7 @@ var options = { sep.getStyleClass().add("separator"); checkBoxList.add(sep); }); - holder.getChildren().clear(); - holder.getChildren().addAll(checkBoxList); + modlist.getChildren().clear(); + modlist.getChildren().addAll(checkBoxList); } }; diff --git a/Launcher/runtime/dialog/servers.css b/Launcher/runtime/dialog/servers.css new file mode 100644 index 00000000..edb37b39 --- /dev/null +++ b/Launcher/runtime/dialog/servers.css @@ -0,0 +1,32 @@ +/*-- DrLeonardo Design --*/ + +/* Server buttons */ +.server-button { + -jfx-button-type: FLAT; + -fx-font-weight: bold; + -fx-font-size: 16pt; + -fx-background-color: transparent; + -fx-background-size: cover; + -fx-background-radius: 0; + -fx-alignment: CENTER-LEFT; + -fx-padding: 0 0 0 75; + -fx-font-family: "Segoe UI"; + -fx-text-fill: #323232; + -fx-pref-width: 282px; + -fx-pref-height: 75px; +} + +.server-button:selected { + -fx-border-width: 0 0 0 2; + -fx-border-style: none none none solid; + -fx-border-color: #323232; +} + +/** server-button- **/ + +.server-button-Example { + -fx-background-image: url('images/servers/example.png'); +} + + +/*-- DrLeonardo Design --*/ \ No newline at end of file diff --git a/Launcher/runtime/dialog/styles.css b/Launcher/runtime/dialog/styles.css index 17c10d65..aa88be77 100644 --- a/Launcher/runtime/dialog/styles.css +++ b/Launcher/runtime/dialog/styles.css @@ -3,7 +3,7 @@ Button, CheckBox, ComboBox, RadioButton { -fx-cursor: hand; } -/* Background */ +/* Backgrounds */ #layout { -fx-background-color: transparent; -fx-background-size: cover; @@ -11,11 +11,32 @@ #layout { -fx-pref-height: 425px; -fx-background-image: url('images/background.jpg'); } +#background { + -fx-background-color: #fff; +} +/** Labels **/ +#background > #settingsTitle { + -fx-font-size: 14pt; + -fx-alignment: baseline-center; +} + +#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: 120px; + -fx-pref-height: 25px; +} /* Mask */ #mask { -fx-background-color: rgba(0, 0, 0, 0.5); - -fx-pref-width: 693px; + -fx-pref-width: 692px; -fx-pref-height: 425px; } @@ -33,82 +54,25 @@ .error{ /* bars */ #bar { -fx-background-color: #323232; - -fx-pref-width: 45px; + -fx-pref-width: 46px; -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-width: 46px; -fx-pref-height: 45px; } -#hide { +#hide, #back, #goConsole, #settings, #logout, #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/hide.png'); - -fx-pref-width: 45px; + -fx-pref-width: 46px; -fx-pref-height: 45px; } -#back { - -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/back.png'); - -fx-pref-width: 45px; - -fx-pref-height: 45px; -} -#goConsole { - -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/console.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 { @@ -190,7 +154,7 @@ #news { /* MenuPane */ .serverentrance { -fx-background-color: rgba(255, 255, 255, 0.71); - -fx-pref-width: 387px; + -fx-pref-width: 386px; -fx-pref-height: 425px; } @@ -208,16 +172,41 @@ .clientLaunch{ .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; } +.clientLaunch:hover, .clientLaunch:pressed { -fx-background-color: #74C085; } +/* Pressets options */ +.pressetLight { + -jfx-toggle-color: #61B373; + -jfx-untoggle-color: #FAFAFA; + -jfx-toggle-line-color: rgba(116, 192, 133, 0.79); + -jfx-untoggle-line-color: #999999; + -jfx-size: 10.0; + -jfx-disable-visual-focus: false; +} + +.pressetMedium { + -jfx-toggle-color: #61B373; + -jfx-untoggle-color: #FAFAFA; + -jfx-toggle-line-color: rgba(116, 192, 133, 0.79); + -jfx-untoggle-line-color: #999999; + -jfx-size: 10.0; + -jfx-disable-visual-focus: false; +} + +.pressetHigh { + -jfx-toggle-color: #61B373; + -jfx-untoggle-color: #FAFAFA; + -jfx-toggle-line-color: rgba(116, 192, 133, 0.79); + -jfx-untoggle-line-color: #999999; + -jfx-size: 10.0; + -jfx-disable-visual-focus: false; +} /* Scrolls */ .scroll-pane { @@ -254,56 +243,33 @@ .scroll-bar { } .scroll-pane>.corner { - -fx-background-color: black; + -fx-background-color: rgba(0, 0, 0, 0.19); } -/* 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; +/* OptionsPane */ +#optionsPane > #modlist { + -fx-background-color: transparent; + } -.server-button:selected { - -fx-border-width: 0 0 0 5; - -fx-border-style: none none none solid; - -fx-border-color: #323232; +#optionsPane > #modlist > .viewport { + -fx-background-color: transparent; } -/** Server custom buttons **/ -/** server-button- **/ -.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'); +.description-text { + -fx-font-smoothing-type: lcd; + -fx-fill: #8c8c8c; + -fx-font-size: 12px; } -/* Labels */ -#serverLabel{ - -fx-text-fill: #323232; - -fx-padding: 0 0 0 14; - -fx-pref-width: 265px; - -fx-pref-height: 25px; +.lineHead { + -fx-stroke: #d8d8d8; + -fx-stroke-width: 10; } -#serverStatus{ - -fx-text-fill: #323232; - -fx-pref-width: 120px; - -fx-pref-height: 25px; +.separator *.line { + -fx-border-color: transparent; + -fx-border-width: 0 0 10 0; } #serverlist{ diff --git a/Launcher/runtime/init.js b/Launcher/runtime/init.js index b073c87c..b3193289 100644 --- a/Launcher/runtime/init.js +++ b/Launcher/runtime/init.js @@ -1,5 +1,5 @@ -var app, stage, scene, loginScene, menuScene, consoleScene; -var rootPane, loginPane, authPane, menuPane, consolePane; +var app, stage, scene, loginScene, menuScene, consoleScene, optionsScene; +var rootPane, loginPane, menuPane, consoleMenu, optionsMenu; var LauncherApp = Java.extend(JSApplication, { init: function() { @@ -9,7 +9,7 @@ var LauncherApp = Java.extend(JSApplication, { cliParams.applySettings(); }, start: function(primaryStage) { stage = primaryStage; - stage.initStyle(javafx.stage.StageStyle.TRANSPARENT); + stage.initStyle(javafx.stage.StageStyle.TRANSPARENT); stage.setResizable(false); stage.setTitle(config.title); @@ -18,9 +18,10 @@ var LauncherApp = Java.extend(JSApplication, { stage.getIcons().add(new javafx.scene.image.Image(iconURL)); }); - loginPane = loadFXML("dialog/login.fxml"); - menuPane = loadFXML("dialog/mainmenu.fxml"); - consolePane = loadFXML("dialog/console.fxml"); + loginPane = loadFXML("dialog/scenes/login/login.fxml"); + menuPane = loadFXML("dialog/scenes/mainmenu/mainmenu.fxml"); + consoleMenu = loadFXML("dialog/scenes/console/console.fxml"); + optionsMenu = loadFXML("dialog/scenes/options/options.fxml"); loginScene = new javafx.scene.Scene(loginPane); loginScene.setFill(javafx.scene.paint.Color.TRANSPARENT); @@ -28,9 +29,12 @@ var LauncherApp = Java.extend(JSApplication, { menuScene = new javafx.scene.Scene(menuPane); menuScene.setFill(javafx.scene.paint.Color.TRANSPARENT); - consoleScene = new javafx.scene.Scene(consolePane); + consoleScene = new javafx.scene.Scene(consoleMenu); consoleScene.setFill(javafx.scene.paint.Color.TRANSPARENT); + optionsScene = new javafx.scene.Scene(optionsMenu); + optionsScene.setFill(javafx.scene.paint.Color.TRANSPARENT); + setCurrentScene(loginScene); initLauncher();