diff --git a/src/sample/Main.java b/src/sample/Main.java index 4c44568..4197f76 100644 --- a/src/sample/Main.java +++ b/src/sample/Main.java @@ -2,7 +2,6 @@ package sample; import javafx.application.Application; import javafx.fxml.FXMLLoader; -import javafx.scene.Node; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; @@ -16,18 +15,23 @@ public class Main extends Application { public void start(Stage primaryStage) throws Exception{ primaryStage.initStyle(StageStyle.UNDECORATED); Parent root = FXMLLoader.load(getClass().getResource("sample.fxml")); - primaryStage.setTitle("Team Avion Launcher [WIP]"); + primaryStage.setTitle("Hello World"); primaryStage.setScene(new Scene(root, 900, 500)); primaryStage.show(); primaryStage.maximizedProperty().addListener((observable, oldValue, newValue) -> { if (newValue) primaryStage.setMaximized(false); }); - root.lookup("#exit").setOnMouseClicked(event -> primaryStage.close()); + root.lookup("#exit").setOnMouseClicked(event -> primaryStage.close()); // Close program if button is clicked + + + + // Drag root.lookup("#rectangle").setOnMouseDragged(event -> { - + primaryStage.setX(event.getScreenX()+(event.getScreenX()-primaryStage.getX())); + primaryStage.setY(event.getScreenY()+(event.getScreenY()-primaryStage.getY())); }); } diff --git a/src/sample/net/Updater.java b/src/sample/net/Updater.java new file mode 100644 index 0000000..adcb56f --- /dev/null +++ b/src/sample/net/Updater.java @@ -0,0 +1,25 @@ +package sample.net; + +import java.io.IOException; +import java.net.URL; +import java.net.URLConnection; + +/** + * Simple thing for updating launcher + */ +public class Updater { + + private URLConnection conn; + + private Updater(String URL) throws IOException { + conn = new URL(URL).openConnection(); + } + + public void downloadPorn(){ + //TODO: Download lots of porn + } + + public void downloadMorePorn(){ + //TODO: Download more porn + } +}