From 3b8eb3d8516f28fa6c11bdd4be38aabab83f47a3 Mon Sep 17 00:00:00 2001 From: DrLeonardo Date: Wed, 15 May 2019 16:27:16 +0300 Subject: [PATCH] Update styles, fix blur effect, fix combobox styles, remove pressed options --- Launcher/runtime/dialog/dialog.js | 63 ++++-- .../dialog/images/downloader/blured.jpg | Bin 0 -> 6997 bytes .../dialog/overlay/processing/processing.js | 14 +- .../runtime/dialog/overlay/update/update.css | 4 +- .../runtime/dialog/overlay/update/update.fxml | 14 +- .../runtime/dialog/overlay/update/update.js | 3 + .../runtime/dialog/scenes/login/login.fxml | 77 ++++---- .../dialog/scenes/mainmenu/mainmenu.fxml | 182 +++++++++--------- .../dialog/scenes/options/options.fxml | 21 +- Launcher/runtime/dialog/styles.css | 10 +- 10 files changed, 207 insertions(+), 181 deletions(-) create mode 100644 Launcher/runtime/dialog/images/downloader/blured.jpg diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js index 77cf4281..1c38ef06 100644 --- a/Launcher/runtime/dialog/dialog.js +++ b/Launcher/runtime/dialog/dialog.js @@ -1,10 +1,11 @@ -var authPane, dimPane, serverPane, bar, consoleBar, optionsPane, consolePane; +var authPane, dimPane, serverPane, bar, consoleBar, optionsPane, consolePane, loginPaneLayout, serverPaneLayout; var loginField, passwordField, savePasswordBox, authOptions; var serverList, serverInfo, serverDescription, serverEntrance, serverLabel, serverStatus; var profilesList = []; var movePoint = null; var pingers = {}; var loginData; +var authTypes = {}; function initLauncher() { initLoginScene(); @@ -41,6 +42,10 @@ function initLoginScene() { var pane = loginPane.lookup("#authPane"); authPane = pane; + var loginLayout = loginPane.lookup("#layout"); + loginPaneLayout = loginLayout; + + loginField = pane.lookup("#login"); loginField.setOnMouseMoved(function(event){rootPane.fireEvent(event)}); loginField.setOnAction(goAuth); @@ -91,6 +96,9 @@ function initMenuScene() { var pane = menuPane.lookup("#serverPane"); serverPane = pane; + var menuLayout = menuPane.lookup("#layout"); + serverPaneLayout = menuLayout; + pane.lookup("#clientSettings").setOnAction(goOptions); serverList = pane.lookup("#serverlist").getContent(); serverInfo = pane.lookup("#serverinfo").getContent(); @@ -187,13 +195,16 @@ function goAuth(event) { return; } - // Get auth - /* var auth = authOptions.getSelectionModel().getSelectedItem(); - if (auth === null) { - return; // No auth selected - }*/ + var auth = authOptions.getSelectionModel().getSelectedItem(); + if (auth === null) { + return; // No auth selected + } var rsaPassword = null; + var auth = authOptions.getSelectionModel().getSelectedItem(); + if (auth === null) { + return; + } if (!passwordField.isDisable()) { var password = passwordField.getText(); if (password !== null && !password.isEmpty()) { @@ -208,7 +219,7 @@ function goAuth(event) { } settings.login = login; - doAuth(/*auth, */login, rsaPassword); + doAuth(login, rsaPassword, authTypes[auth]); } /* ======== Console ======== */ @@ -242,17 +253,22 @@ function verifyLauncher(e) { initOffline(); } overlay.swap(0, processing.overlay, function(event) makeAuthAvailabilityRequest(function(result) { - //result.list; - //result.list[0].name; - //result.list[0].displayName; - result.list.forEach(function(auth_type, i, arr) { - (function() { - authOptions.getItems().add(auth_type.displayName); - //var sm = authOptions.getSelectionModel(); - //sm.selectedIndexProperty()["addListener(javafx.beans.value.ChangeListener)"](settings.auth = i); - })(); - - }); + var iter = 0; + authTypes = {}; + result.list.forEach(function(auth_type, i, arr) { + var serverAuth = new com.jfoenix.controls.JFXComboBox(); + serverAuth.getStyleClass().add("authOptions"); + authOptions.getItems().add(auth_type.displayName); + authTypes[auth_type.displayName] = auth_type.name; + iter++; + }); + authOptions.getSelectionModel().select(0); + var sm = authOptions.getSelectionModel().selectedIndexProperty(); + sm.addListener(new javafx.beans.value.ChangeListener({ + changed: function (observableValue, oldSelection, newSelection) { + settings.auth = authTypes[authOptions.getSelectionModel().getSelectedItem()]; + } + })); overlay.swap(0, processing.overlay, function(event) makeProfilesRequest(function(result) { settings.lastProfiles = result.profiles; updateProfilesList(result.profiles); @@ -267,13 +283,14 @@ function verifyLauncher(e) { })); } -function doAuth(login, rsaPassword) { +function doAuth(login, rsaPassword, auth_type) { processing.resetOverlay(); overlay.show(processing.overlay, function (event) { FunctionalBridge.getHWID.join(); - makeAuthRequest(login, rsaPassword, function (result) { + makeAuthRequest(login, rsaPassword, auth_type, function (result) { FunctionalBridge.setAuthParams(result); - loginData = { pp: result.playerProfile , accessToken: result.accessToken, permissions: result.permissions}; + loginData = { pp: result.playerProfile , accessToken: result.accessToken, permissions: result.permissions, + auth_type: settings.auth}; overlay.hide(0, function () { setCurrentScene(menuScene); @@ -403,6 +420,8 @@ var overlay = { dimPane.setVisible(true); dimPane.toFront(); + loginPaneLayout.setEffect(new javafx.scene.effect.GaussianBlur(10)); + serverPaneLayout.setEffect(new javafx.scene.effect.GaussianBlur(10)); fade(dimPane, 0.0, 0.0, 1.0, function(event) { dimPane.requestFocus(); dimPane.getChildren().add(newOverlay); @@ -423,6 +442,8 @@ var overlay = { authPane.setDisable(false); rootPane.requestFocus(); + loginPaneLayout.setEffect(new javafx.scene.effect.GaussianBlur(0)); + serverPaneLayout.setEffect(new javafx.scene.effect.GaussianBlur(0)); overlay.current = null; if (onFinished !== null) { onFinished(); diff --git a/Launcher/runtime/dialog/images/downloader/blured.jpg b/Launcher/runtime/dialog/images/downloader/blured.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b721d11c4001e5d0c34d4b360120a501399440d7 GIT binary patch literal 6997 zcmbVQ3sh5Ax;_aHd1-kB5U3BRiHQ;_=3uO^Mli@Dp(G&)NGp#LlZ?euOObdPgGH+m z6d?i$t;QsT1htilQ^Dd;i?&*Gg%GSd#c6GuQQGQE#mnflK+)>~v zqC`#JD=AFOgBYj6WIP6+SRh<)hysbVuqB3xf-p~F4Z07Wx`(gmuK+HzjQIccLPhDD zait}1&c);6<2cykzhFsNpnt%O0KdQ)(`N(+1%}LIM$QZin;HKceHL>WXXT0)I7_*_ zl>7|dnst2c(#+RH>oyc^ly6)mEUSF|)vfs@8;j8XH z`ApUVJYflU=?lw}*6@?prlh7xvZUGTa&q&EUoDYslq-~5-YkEsVr!-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M2fWt3!xp>krSBT{q!h4eGJCNB6_++x8+f25Z zME60o zq8{DUclUVyfXBEv1e#5Q_fq>BiN3{AR6m`6KI7x8qC?Xc&GVjUxuX$71#EhRu^Rm* zNMM)SWy%+E9lRzuC{q+JsU3))`sOB-?BBJK`|%?-$};^yVRp7ndMCayMAT`jO1_ec z)hcQR>;iUHG&~A47rcne5Lndf%bIcQM}ixS80BU{C$C%y?NJhR^pG(m=oP^3)Dhox zCcGaSe)RARco@CHoP-nt>WWivQuQo#w+X+&q-;r6FzwWE^ky)za0nT3g9*L2{xupp z5k7%@_dOenQ*04JN&?=IHNN07I1Bs5;W80l`D=SLSd%6#@3IqK&UiF2ygR~q9G*XV zF=5Ej?w66u6zD7XZZ*~r%NI@IAc^WSb(a^@NBt#Q8xohWTgrB zy2usvm|z$G22>CA`2!0Z2>%KO!s!s12tr&cw6q-XN4Q%8>Unm?C@CrT3ltI>`NBj{ z+)Y#^AhFx1o|Q`eU`G5#jNUGZA24gtFLo0@4^O #utitle { @@ -20,7 +20,7 @@ #overlay > #description.error { } .downloadPane { - -fx-background-color: rgba(0, 0, 0, 0.3); + -fx-background-color: rgba(0, 0, 0, 0.2); } /* Progress bar */ diff --git a/Launcher/runtime/dialog/overlay/update/update.fxml b/Launcher/runtime/dialog/overlay/update/update.fxml index 0a1b7653..c44e8bc9 100644 --- a/Launcher/runtime/dialog/overlay/update/update.fxml +++ b/Launcher/runtime/dialog/overlay/update/update.fxml @@ -8,9 +8,9 @@ - + - + - + + + - - + + - + diff --git a/Launcher/runtime/dialog/overlay/update/update.js b/Launcher/runtime/dialog/overlay/update/update.js index da013488..4996f7f8 100644 --- a/Launcher/runtime/dialog/overlay/update/update.js +++ b/Launcher/runtime/dialog/overlay/update/update.js @@ -4,6 +4,9 @@ var update = { initOverlay: function() { update.overlay = loadFXML("dialog/overlay/update/update.fxml"); + //var updateLayout = update.overlay.lookup("#overlay"); + //serverPaneLayout = updateLayout; + update.title = update.overlay.lookup("#utitle"); update.description = update.overlay.lookup("#description"); update.progress = update.overlay.lookup("#progress"); diff --git a/Launcher/runtime/dialog/scenes/login/login.fxml b/Launcher/runtime/dialog/scenes/login/login.fxml index fe5c2c58..a2db6ff7 100644 --- a/Launcher/runtime/dialog/scenes/login/login.fxml +++ b/Launcher/runtime/dialog/scenes/login/login.fxml @@ -14,45 +14,50 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - diff --git a/Launcher/runtime/dialog/scenes/mainmenu/mainmenu.fxml b/Launcher/runtime/dialog/scenes/mainmenu/mainmenu.fxml index 6b187622..70e6b20c 100644 --- a/Launcher/runtime/dialog/scenes/mainmenu/mainmenu.fxml +++ b/Launcher/runtime/dialog/scenes/mainmenu/mainmenu.fxml @@ -13,94 +13,98 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Launcher/runtime/dialog/scenes/options/options.fxml b/Launcher/runtime/dialog/scenes/options/options.fxml index 9bbbdec1..c0b42259 100644 --- a/Launcher/runtime/dialog/scenes/options/options.fxml +++ b/Launcher/runtime/dialog/scenes/options/options.fxml @@ -1,7 +1,6 @@ - @@ -9,20 +8,19 @@ + + - + - - - - - + + - + @@ -31,9 +29,14 @@ + + + + + - + diff --git a/Launcher/runtime/dialog/styles.css b/Launcher/runtime/dialog/styles.css index 69a98032..29c61be8 100644 --- a/Launcher/runtime/dialog/styles.css +++ b/Launcher/runtime/dialog/styles.css @@ -32,9 +32,7 @@ #serverStatus{ /* Mask */ #mask { - -fx-background-color: rgba(0, 0, 0, 0.5); - -fx-pref-width: 692px; - -fx-pref-height: 450px; + -fx-effect: DropShadow( gaussian , rgba(255,255,255,0.5) , 0,0,0,1 ); } /** Errors **/ @@ -193,7 +191,7 @@ .combologin-popup .list-view { .combologin .list-cell:filled:selected .text, .combologin .list-cell:filled:selected .text { - -fx-fill: #909090; + -fx-fill: #323232; } .combologin .arrow, @@ -210,13 +208,13 @@ .combologin-popup .list-view .list-cell:filled:selected, .combologin-popup .list { -fx-background: -fx-accent; -fx-background-color: -fx-selection-bar; - -fx-text-fill: -fx-selection-bar-text; + -fx-text-fill: #909090; } .combologin-popup .list-view .list-cell:filled:hover { -fx-background-color: white; - -fx-text-fill: -fx-text-inner-color; + -fx-text-fill: #909090; } /** web**/