diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js index acd7ba4b..bd9796f2 100644 --- a/Launcher/runtime/dialog/dialog.js +++ b/Launcher/runtime/dialog/dialog.js @@ -121,16 +121,10 @@ function initConsoleScene() { if(movePoint === null) { return; } - - consoleStage.setX(event.getScreenX() - movePoint.getX()); - consoleStage.setY(event.getScreenY() - movePoint.getY()); }); var pane = consoleMenu.lookup("#bar"); consoleBar = pane; - pane.lookup("#close").setOnAction(function(){ - consoleStage.hide(); - }); var text = consoleMenu.lookup("#textField"); var output = consoleMenu.lookup("#output"); var appendFunction = function(line) javafx.application.Platform.runLater(function() output.appendText(line)); @@ -141,7 +135,11 @@ function initConsoleScene() { FunctionalBridge.addPlainOutput(function(string) { appendFunction(string+"\n"); }) - pane.lookup("#hide").setOnAction(function(event) { consoleStage.setIconified(true) }); + 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 = consoleMenu.lookup("#consolePane"); consolePane = pane; @@ -223,7 +221,7 @@ function goAuth(event) { /* ======== Console ======== */ function goConsole(event) { - setConsoleCurrentScene(consoleScene); + setCurrentScene(consoleScene); } /* ======== Settings ======== */ diff --git a/Launcher/runtime/dialog/scenes/console/console.fxml b/Launcher/runtime/dialog/scenes/console/console.fxml index 738a5506..17a23c1d 100644 --- a/Launcher/runtime/dialog/scenes/console/console.fxml +++ b/Launcher/runtime/dialog/scenes/console/console.fxml @@ -11,24 +11,27 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Launcher/runtime/init.js b/Launcher/runtime/init.js index 1db04f3b..ee0079c3 100644 --- a/Launcher/runtime/init.js +++ b/Launcher/runtime/init.js @@ -1,4 +1,4 @@ -var app, stage, scene, loginScene, menuScene, consoleScene, consoleStage, optionsScene; +var app, stage, scene, loginScene, menuScene, consoleScene, optionsScene; var rootPane, loginPane, menuPane, consoleMenu, optionsMenu; var LauncherApp = Java.extend(JSApplication, { @@ -15,11 +15,6 @@ var LauncherApp = Java.extend(JSApplication, { stage.setResizable(false); stage.setTitle(config.title); - consoleStage = new javafx.stage.Stage(); - consoleStage.initStyle(javafx.stage.StageStyle.TRANSPARENT); - consoleStage.setResizable(false); - consoleStage.setTitle(config.title); - config.icons.forEach(function(icon) { var iconURL = Launcher.getResourceURL(icon).toString(); stage.getIcons().add(new javafx.scene.image.Image(iconURL)); @@ -66,12 +61,6 @@ function setCurrentScene(scene) { stage.show(); } -function setConsoleCurrentScene(scene) { - consoleStage.setScene(scene); - consoleStage.sizeToScene(); - consoleStage.show(); -} - function setRootParent(parent) { scene.setRoot(parent);