From 08b1e8248d594adf754842deb937993436071a28 Mon Sep 17 00:00:00 2001 From: Michael-Jouanneau Date: Wed, 21 Dec 2016 11:42:44 +0100 Subject: [PATCH 1/8] Added things --- src/Launcher/Main.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Launcher/Main.java b/src/Launcher/Main.java index 55e5d4b..36be3f5 100644 --- a/src/Launcher/Main.java +++ b/src/Launcher/Main.java @@ -201,6 +201,8 @@ public class Main extends Application { login.setResizable(false); login.setTitle("Minecraft Login"); + + minecraftlogin.lookup("#close-minecraft-login-window").setOnMouseClicked(event4 ->{ login.close(); }); From fe08893d2592c0af4d39c4e4b1245187e760c261 Mon Sep 17 00:00:00 2001 From: Michael-Jouanneau Date: Wed, 21 Dec 2016 11:45:18 +0100 Subject: [PATCH 2/8] Added things --- src/Launcher/Main.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Launcher/Main.java b/src/Launcher/Main.java index 36be3f5..f0640d4 100644 --- a/src/Launcher/Main.java +++ b/src/Launcher/Main.java @@ -204,6 +204,7 @@ public class Main extends Application { minecraftlogin.lookup("#close-minecraft-login-window").setOnMouseClicked(event4 ->{ + System.out.println("Closing window"); login.close(); }); From d7f188fa432257d396807edf55d30a2b945ee9f3 Mon Sep 17 00:00:00 2001 From: Michael-Jouanneau Date: Thu, 22 Dec 2016 11:14:24 +0100 Subject: [PATCH 3/8] Added things --- src/Launcher/Main.java | 15 ++++++++++++--- src/assets/layout/instance_userinfo.fxml | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Launcher/Main.java b/src/Launcher/Main.java index f0640d4..c228098 100644 --- a/src/Launcher/Main.java +++ b/src/Launcher/Main.java @@ -59,7 +59,6 @@ public class Main extends Application { public static final int semVerMajor = 0; // Major version public static final int semVerMinor = 2; // Minor version public static final int semVerPatch = 5; // Patch version - public static final int semVerSubPatch = 1; double xOffset = 0, yOffset = 0; // Offsets for dragging @@ -69,7 +68,7 @@ public class Main extends Application { private TextField Search_modpacks, Username_minecraft; private Image appIcon; private Rectangle dragBar; // Draggable top bar - Pane root, tab; + Pane root, tab, dragbar_1; private PasswordField Password_minecraft; Node activeTab, settings_activeTab; private Label dialog_changer; @@ -100,7 +99,7 @@ public class Main extends Application { root = (Pane) Tabs.load("main"); // Load via layout loader ((Label)root.lookup("#version")).setText(((Label) root.lookup("#version")) // Dynamically set version label - .getText().replace("$v", semVerDevState+" "+semVerMajor+"."+semVerMinor+"."+semVerPatch+"-"+semVerSubPatch)); // Use variables to define version + .getText().replace("$v", semVerDevState+" "+semVerMajor+"."+semVerMinor+"."+semVerPatch)); // Use variables to define version primaryStage.setTitle("Team-Avion Launcher"); primaryStage.setScene(new Scene(root, 900, 500)); primaryStage.getIcons().clear(); @@ -112,6 +111,7 @@ public class Main extends Application { dragBar = (Rectangle) root.lookup("#rectangle"); + Home_btn = (Button) root.lookup("#Home-btn"); Modpack_btn = (Button) root.lookup("#Modpacks-btn"); Settings_btn = (Button) root.lookup("#Settings-btn"); @@ -201,7 +201,16 @@ public class Main extends Application { login.setResizable(false); login.setTitle("Minecraft Login"); + dragbar_1 = (Pane) Tabs.load("instance_userinfo").lookup("#dragbar-1"); + dragbar_1.setOnMousePressed(event4 -> { + xOffset = event.getSceneX(); + yOffset = event.getSceneY(); + }); + dragbar_1.setOnMouseDragged(event4 -> { + login.setX(event.getScreenX() - xOffset); + login.setY(event.getScreenY() - yOffset); + }); minecraftlogin.lookup("#close-minecraft-login-window").setOnMouseClicked(event4 ->{ System.out.println("Closing window"); diff --git a/src/assets/layout/instance_userinfo.fxml b/src/assets/layout/instance_userinfo.fxml index 296e9ed..0513e4e 100644 --- a/src/assets/layout/instance_userinfo.fxml +++ b/src/assets/layout/instance_userinfo.fxml @@ -9,7 +9,7 @@ - + From bc59d0ccfd6a855155ac99a4fe8a1eff62c11d5c Mon Sep 17 00:00:00 2001 From: Michael-Jouanneau Date: Thu, 22 Dec 2016 11:24:07 +0100 Subject: [PATCH 4/8] Added things --- src/Launcher/Main.java | 8 ++++---- src/assets/style/default-theme.css | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Launcher/Main.java b/src/Launcher/Main.java index c228098..7202313 100644 --- a/src/Launcher/Main.java +++ b/src/Launcher/Main.java @@ -204,12 +204,12 @@ public class Main extends Application { dragbar_1 = (Pane) Tabs.load("instance_userinfo").lookup("#dragbar-1"); dragbar_1.setOnMousePressed(event4 -> { - xOffset = event.getSceneX(); - yOffset = event.getSceneY(); + xOffset = event4.getSceneX(); + yOffset = event4.getSceneY(); }); dragbar_1.setOnMouseDragged(event4 -> { - login.setX(event.getScreenX() - xOffset); - login.setY(event.getScreenY() - yOffset); + login.setX(event4.getScreenX() - xOffset); + login.setY(event4.getScreenY() - yOffset); }); minecraftlogin.lookup("#close-minecraft-login-window").setOnMouseClicked(event4 ->{ diff --git a/src/assets/style/default-theme.css b/src/assets/style/default-theme.css index fc3ee57..c5911be 100644 --- a/src/assets/style/default-theme.css +++ b/src/assets/style/default-theme.css @@ -146,12 +146,12 @@ -fx-border-color: white; -fx-border-width: 0px 0px 2px 0px; } -#minecraft-login { +#minecraft-login, #close-minecraft-login-window { -fx-background-color: #252525; -fx-background-radius: 0em; -fx-text-fill: white; } -#minecraft-login:hover { +#minecraft-login:hover, #close-minecraft-login-window:hover{ -fx-background-color: #bcbcbc; -fx-background-radius: 0em; -fx-text-fill: black; From 94c9cf2aa641264d21778b5c9c195e2a16eebc5c Mon Sep 17 00:00:00 2001 From: Michael-Jouanneau Date: Thu, 22 Dec 2016 11:31:26 +0100 Subject: [PATCH 5/8] Added things --- src/assets/layout/instance_userinfo.fxml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/assets/layout/instance_userinfo.fxml b/src/assets/layout/instance_userinfo.fxml index 0513e4e..7ea1284 100644 --- a/src/assets/layout/instance_userinfo.fxml +++ b/src/assets/layout/instance_userinfo.fxml @@ -2,6 +2,7 @@ + @@ -24,13 +25,23 @@ - - + +