From f2e68c9f622998889db4f8b7634103fcac7f28f1 Mon Sep 17 00:00:00 2001 From: Zaxar163 <35835496+Zaxar163@users.noreply.github.com> Date: Tue, 7 May 2019 14:49:51 +0300 Subject: [PATCH] =?UTF-8?q?[FEATURE]=20=D0=94=D0=B8=D0=B7=D0=B0=D0=B9?= =?UTF-8?q?=D0=BD,=20=D0=BF=D1=80=D0=BE=D0=B4=D0=BE=D0=BB=D0=B6=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5.=20(#250)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update design, add class for RAMslider & checkbox, fixes * [FIX] Регрессия в dialog.js * [FIX] Строки без смысла. --- Launcher/runtime/dialog/dialog.js | 40 ++++---- .../runtime/dialog/images/downloader/line.png | Bin 433 -> 1839 bytes .../dialog/overlay/processing/processing.fxml | 6 +- .../dialog/overlay/settings/settings.css | 27 +++-- .../dialog/overlay/settings/settings.fxml | 26 ++--- .../runtime/dialog/overlay/update/update.css | 4 +- .../runtime/dialog/overlay/update/update.fxml | 10 +- .../dialog/scenes/console/console.fxml | 8 +- .../runtime/dialog/scenes/login/login.fxml | 25 +++-- .../dialog/scenes/mainmenu/mainmenu.fxml | 36 +++---- .../dialog/scenes/options/options.fxml | 16 +-- .../runtime/dialog/scenes/options/options.js | 2 + Launcher/runtime/dialog/styles.css | 93 ++++++++++++++---- 13 files changed, 174 insertions(+), 119 deletions(-) diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js index 122a7816..cfc3a805 100644 --- a/Launcher/runtime/dialog/dialog.js +++ b/Launcher/runtime/dialog/dialog.js @@ -80,16 +80,13 @@ function initMenuScene() { stage.setY(event.getScreenY() - movePoint.getY()); }); - var pane = loginPane.lookup("#bar"); + var pane = menuPane.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("#goConsole").setOnAction(goConsole); - menuPane.lookup("#logout").setOnAction(function(){ - setCurrentScene(loginScene); - }); + pane.lookup("#close").setOnAction(function(event){ javafx.application.Platform.exit()}); + pane.lookup("#hide").setOnAction(function(event){ stage.setIconified(true)}); + pane.lookup("#discord").setOnAction(function(){ openURL(config.discord); }); + pane.lookup("#settings").setOnAction(goSettings); + pane.lookup("#goConsole").setOnAction(goConsole); var pane = menuPane.lookup("#serverPane"); serverPane = pane; @@ -104,6 +101,9 @@ function initMenuScene() { serverEntrance.lookup("#clientLaunch").setOnAction(function(){ doUpdate(profilesList[serverHolder.old], loginData.pp, loginData.accessToken); }); + pane.lookup("#logout").setOnAction(function(){ + setCurrentScene(loginScene); + }); } @@ -236,21 +236,17 @@ function verifyLauncher(e) { initOffline(); } overlay.swap(0, processing.overlay, function(event) makeAuthAvailabilityRequest(function(result) { - //@DrLeonardo нужно напистаь добавление в список - //result.list весь список - //result.list[0].name имя авторизации(не видно) - //result.list[0].displayName имя авторизации(видно) + //result.list; + //result.list[0].name; + //result.list[0].displayName; result.list.forEach(function(auth_type, i, arr) { + + var serverAuth = new com.jfoenix.controls.JFXComboBox(); + serverAuth.getStyleClass().add("authOptions"); + (function() { - //profilesList[serverBtn] = profile; - //var hold = serverBtn; - //var hIndex = index; - //serverBtn.setOnAction(function(event) { - // serverHolder.set(hold); - // settings.profile = hIndex; - //}); - authOptions.getItems().add(auth_type.displayName); - })(); + authOptions.getItems().add(auth_type.displayName); + })(); }); overlay.swap(0, processing.overlay, function(event) makeProfilesRequest(function(result) { settings.lastProfiles = result.profiles; diff --git a/Launcher/runtime/dialog/images/downloader/line.png b/Launcher/runtime/dialog/images/downloader/line.png index 17339c540b5580d43684b159610f096ce1700ed7..8ff252533541c884d38897edf97f6fa37c471dd5 100644 GIT binary patch literal 1839 zcmb_dYfKzf6ut|nl(w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settings/settings.css index 4b6efb50..4cd880f7 100644 --- a/Launcher/runtime/dialog/overlay/settings/settings.css +++ b/Launcher/runtime/dialog/overlay/settings/settings.css @@ -21,25 +21,24 @@ #holder #dirChange { /* RAM slider */ #holder > #ramSlider > .track { - -fx-background-color: #D8E0E3; - -fx-background-insets: none; - -fx-background-radius: 2px; - -fx-padding: 2px; + -fx-background-color: #909090; } #holder > #ramSlider > .thumb { - -fx-background-color: #3498DB; - -fx-background-insets: none; - -fx-background-radius: 5px; - -fx-padding: 5px; + -fx-background-color: #5fd97a; } -#holder > #ramSlider:hover > .thumb { - -fx-background-color: #2F8BC8; +#holder > #ramSlider > .colored-track { + -fx-background-color: #5fd97a; } -#holder > #ramSlider:pressed > .thumb { - -fx-background-color: #2876AA; +#holder > #ramSlider > .animated-thumb { + -fx-background-color: #5fd97a; +} + +#holder > #ramSlider > .slider-value { + -fx-fill: white; + -fx-stroke: white; } /* Dir options */ @@ -70,7 +69,7 @@ #holder > #changeDir:pressed { } #holder > #apply,#applyTransfer{ - -fx-background-color: #61B373; + -fx-background-color: #5fd97a; -fx-background-radius: 0; -fx-text-fill: white; -fx-background-position: center; @@ -80,6 +79,6 @@ #holder > #apply,#applyTransfer{ } #holder > #apply:hover,#applyTransfer:hover, #holder > #apply:focused,#applyTransfer:focused{ - -fx-background-color: #74C085; + -fx-background-color: #75e18c; } /*-- DrLeonardo Design --*/ \ No newline at end of file diff --git a/Launcher/runtime/dialog/overlay/settings/settings.fxml b/Launcher/runtime/dialog/overlay/settings/settings.fxml index 902df91e..f4ca9fac 100644 --- a/Launcher/runtime/dialog/overlay/settings/settings.fxml +++ b/Launcher/runtime/dialog/overlay/settings/settings.fxml @@ -13,23 +13,23 @@ - + - + - - - - - - + + + + + + - - - - + + + + Выделение памяти: @@ -43,7 +43,7 @@ - + diff --git a/Launcher/runtime/dialog/overlay/update/update.css b/Launcher/runtime/dialog/overlay/update/update.css index 4bd19e0a..90542c70 100644 --- a/Launcher/runtime/dialog/overlay/update/update.css +++ b/Launcher/runtime/dialog/overlay/update/update.css @@ -4,7 +4,7 @@ #overlay { -fx-background-color: transparent; -fx-background-size: cover; -fx-pref-width: 693px; - -fx-pref-height: 425px; + -fx-pref-height: 450px; -fx-background-image: url('../../images/background.jpg'); } @@ -24,7 +24,7 @@ #overlay > #description.error { .downloadPane { -fx-background-color: rgba(0, 0, 0, 0.3); -fx-pref-width: 693px; - -fx-pref-height: 425px; + -fx-pref-height: 450px; } /* Progress bar */ diff --git a/Launcher/runtime/dialog/overlay/update/update.fxml b/Launcher/runtime/dialog/overlay/update/update.fxml index ebab8ffd..406bdd40 100644 --- a/Launcher/runtime/dialog/overlay/update/update.fxml +++ b/Launcher/runtime/dialog/overlay/update/update.fxml @@ -13,14 +13,14 @@ - diff --git a/Launcher/runtime/dialog/scenes/console/console.fxml b/Launcher/runtime/dialog/scenes/console/console.fxml index e820612b..d7455885 100644 --- a/Launcher/runtime/dialog/scenes/console/console.fxml +++ b/Launcher/runtime/dialog/scenes/console/console.fxml @@ -27,12 +27,12 @@ - + - + @@ -40,8 +40,8 @@ - - + + diff --git a/Launcher/runtime/dialog/scenes/login/login.fxml b/Launcher/runtime/dialog/scenes/login/login.fxml index 338c4655..fe5c2c58 100644 --- a/Launcher/runtime/dialog/scenes/login/login.fxml +++ b/Launcher/runtime/dialog/scenes/login/login.fxml @@ -7,6 +7,7 @@ + @@ -15,19 +16,23 @@ - + - - - - - - + + + + + + + + + + - + @@ -40,9 +45,9 @@ - + - + diff --git a/Launcher/runtime/dialog/scenes/mainmenu/mainmenu.fxml b/Launcher/runtime/dialog/scenes/mainmenu/mainmenu.fxml index bfbd9238..f124cd17 100644 --- a/Launcher/runtime/dialog/scenes/mainmenu/mainmenu.fxml +++ b/Launcher/runtime/dialog/scenes/mainmenu/mainmenu.fxml @@ -15,11 +15,11 @@ - + - + - + @@ -30,11 +30,11 @@ - + - + - + @@ -44,21 +44,21 @@ - + - + - @@ -84,22 +89,17 @@ - + - + - - - - - - + diff --git a/Launcher/runtime/dialog/scenes/options/options.fxml b/Launcher/runtime/dialog/scenes/options/options.fxml index 41f59941..9bbbdec1 100644 --- a/Launcher/runtime/dialog/scenes/options/options.fxml +++ b/Launcher/runtime/dialog/scenes/options/options.fxml @@ -12,17 +12,17 @@ - + - + - - - + + + - + - + @@ -45,7 +45,7 @@ - + diff --git a/Launcher/runtime/dialog/scenes/options/options.js b/Launcher/runtime/dialog/scenes/options/options.js index 32a6fa28..b5959ff7 100644 --- a/Launcher/runtime/dialog/scenes/options/options.js +++ b/Launcher/runtime/dialog/scenes/options/options.js @@ -110,6 +110,7 @@ var options = { if(modFile.subTreeLevel != null && modFile.subTreeLevel > 1) subLevel = modFile.subTreeLevel; var testMod = new com.jfoenix.controls.JFXCheckBox(modName); + testMod.getStyleClass().add("checkboxOpt"); if(subLevel > 1) for(var i = 1; i < subLevel; i++) @@ -131,6 +132,7 @@ var options = { options.update(); }); checkBoxList.add(testMod); + testMod.getStyleClass().add("modname"); if(modDescription != "") { textDescr = new javafx.scene.text.Text(modDescription); if(subLevel > 1) { diff --git a/Launcher/runtime/dialog/styles.css b/Launcher/runtime/dialog/styles.css index 039bb856..03c7e2cd 100644 --- a/Launcher/runtime/dialog/styles.css +++ b/Launcher/runtime/dialog/styles.css @@ -8,7 +8,7 @@ #layout { -fx-background-color: transparent; -fx-background-size: cover; -fx-pref-width: 738px; - -fx-pref-height: 425px; + -fx-pref-height: 450px; -fx-background-image: url('images/background.jpg'); } #background { @@ -37,7 +37,7 @@ #serverStatus{ #mask { -fx-background-color: rgba(0, 0, 0, 0.5); -fx-pref-width: 692px; - -fx-pref-height: 425px; + -fx-pref-height: 450px; } /** Errors **/ @@ -55,7 +55,7 @@ .error{ #bar { -fx-background-color: #323232; -fx-pref-width: 46px; - -fx-pref-height: 425px; + -fx-pref-height: 450px; } /** buttons in bar **/ #close { @@ -90,7 +90,7 @@ #send:pressed { -fx-background-color: #d8d8d8; } #authPane { -fx-background-color: rgba(255, 255, 255, 0.71); -fx-pref-width: 270px; - -fx-pref-height: 425px; + -fx-pref-height: 450px; } #logo { @@ -106,13 +106,14 @@ .auth { -fx-font-weight: bold; -fx-font-size: 13pt; -fx-background-radius: 0; - -fx-background-color: #61B373; + -fx-background-color: #5fd97a; -fx-text-fill: #ffffff; - -fx-pref-width: 240px; + -fx-pref-width: 200px; -fx-pref-height: 45px; + -fx-effect: dropshadow(gaussian, rgba(23, 25, 29, 0.3), 15,0,0,3); } -.auth:hover, .auth:pressed { -fx-background-color: #74C085; } +.auth:hover, .auth:pressed { -fx-background-color: #75e18c; } #password, #login { -fx-background-radius: 0; @@ -152,49 +153,93 @@ #rememberchb{ } #combologin { -fx-text-fill: #909090; + -fx-prompt-text-fill: #909090; -fx-pref-width: 200px; -fx-pref-height: 30px; } +.combologin, +.combologin { + -fx-font-size: 13px; + -fx-prompt-text-fill: #909090; + -fx-text-fill: #909090; + -fx-background-color: transparent; +} + +.combologin .list-cell { + -fx-background: white; + -fx-background-color: transparent; + -fx-text-fill: -fx-text-base-color; +} + +.combologin-popup .list-view { + -fx-background-color: white, white; + -fx-background-insets: 0, 1; + -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 8, 0.0 , 0 , 0 ); +} + +.combologin .list-cell:filled:selected .text, +.combologin .list-cell:filled:selected .text { + -fx-fill: #909090; +} + +.combologin .arrow, +.combologin .arrow { + -fx-background-color: #5fd97a; +} + +.combologin-popup .list-view .list-cell +{ + -fx-background-color: white; +} + +.combologin-popup .list-view .list-cell:filled:selected, .combologin-popup .list-view .list-cell:filled:selected:hover +{ + -fx-background: -fx-accent; + -fx-background-color: -fx-selection-bar; + -fx-text-fill: -fx-selection-bar-text; +} + +.combologin-popup .list-view .list-cell:filled:hover +{ + -fx-background-color: white; + -fx-text-fill: -fx-text-inner-color; +} /** web**/ #news { -fx-background-color: transparent; -fx-pref-width: 423px; - -fx-pref-height: 425px; + -fx-pref-height: 450px; } /* MenuPane */ .serverentrance { -fx-background-color: rgba(255, 255, 255, 0.71); -fx-pref-width: 386px; - -fx-pref-height: 425px; + -fx-pref-height: 450px; } /** buttons **/ .clientLaunch{ -jfx-button-type: FLAT; -fx-font-weight: bold; - -fx-font-size: 18pt; + -fx-font-size: 16pt; -fx-background-radius: 0; - -fx-background-color: #61B373; + -fx-background-color: #5fd97a; -fx-text-fill: #ffffff; - -fx-pref-width: 260px; - -fx-pref-height: 45px; } .clientSettings{ -fx-background-position: center; -jfx-button-type: FLAT; - -fx-background-color: #61B373; + -fx-background-color: #5fd97a; -fx-background-radius: 0; - -fx-pref-width: 85px; - -fx-pref-height: 51px; } -.clientLaunch:hover, .clientLaunch:pressed { -fx-background-color: #74C085; } +.clientLaunch:hover, .clientLaunch:pressed { -fx-background-color: #75e18c; } /* Pressets options */ .pressetLight, .pressetMedium, .pressetHigh { - -jfx-toggle-color: #61B373; + -jfx-toggle-color: #5fd97a; -jfx-untoggle-color: #FAFAFA; -jfx-toggle-line-color: rgba(116, 192, 133, 0.79); -jfx-untoggle-line-color: #999999; @@ -243,7 +288,6 @@ .scroll-pane>.corner { /* OptionsPane */ #optionsPane > #modlist { -fx-background-color: transparent; - } #optionsPane > #modlist > .viewport { @@ -256,9 +300,18 @@ .description-text { -fx-font-size: 12px; } +.checkboxOpt { + -jfx-checked-color: #5fd97a; + -jfx-unchecked-color: #909090; +} + +.modname { + -fx-text-fill: #323232; +} + .lineHead { -fx-stroke: #d8d8d8; - -fx-stroke-width: 10; + -fx-stroke-width: 1; } .separator *.line {