Did some work on updater
This commit is contained in:
parent
e1210440f4
commit
32273c5269
@ -2,7 +2,6 @@ package sample;
|
|||||||
|
|
||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.scene.Node;
|
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
@ -16,18 +15,23 @@ public class Main extends Application {
|
|||||||
public void start(Stage primaryStage) throws Exception{
|
public void start(Stage primaryStage) throws Exception{
|
||||||
primaryStage.initStyle(StageStyle.UNDECORATED);
|
primaryStage.initStyle(StageStyle.UNDECORATED);
|
||||||
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
|
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.setScene(new Scene(root, 900, 500));
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
primaryStage.maximizedProperty().addListener((observable, oldValue, newValue) -> {
|
primaryStage.maximizedProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
if (newValue)
|
if (newValue)
|
||||||
primaryStage.setMaximized(false);
|
primaryStage.setMaximized(false);
|
||||||
});
|
});
|
||||||
root.lookup("#exit").setOnMouseClicked(event -> primaryStage.close());
|
root.lookup("#exit").setOnMouseClicked(event -> primaryStage.close()); // Close program if button is clicked
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Drag
|
// Drag
|
||||||
root.lookup("#rectangle").setOnMouseDragged(event -> {
|
root.lookup("#rectangle").setOnMouseDragged(event -> {
|
||||||
|
primaryStage.setX(event.getScreenX()+(event.getScreenX()-primaryStage.getX()));
|
||||||
|
primaryStage.setY(event.getScreenY()+(event.getScreenY()-primaryStage.getY()));
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
25
src/sample/net/Updater.java
Normal file
25
src/sample/net/Updater.java
Normal file
@ -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
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user