diff --git a/src/assets/style/nav.css b/src/assets/style/nav.css index 0da82c2..fc26741 100644 --- a/src/assets/style/nav.css +++ b/src/assets/style/nav.css @@ -1,16 +1,16 @@ #exit{ - -fx-background-color: rgba(255, 0, 255, 0); -fx-background-radius: 0; } #exit:hover{ -fx-border-radius: 12px; -fx-background-color: cadetblue; } -#Pane { +#pane{ -fx-border-width: 1px; -fx-border-color: black; -fx-border-style: solid; } + #hyperlink { - + } \ No newline at end of file diff --git a/src/sample/Main.java b/src/sample/Main.java index 5f7f984..524a117 100644 --- a/src/sample/Main.java +++ b/src/sample/Main.java @@ -32,19 +32,13 @@ public class Main extends Application { root.lookup("#exit").setOnMouseClicked(event -> primaryStage.close()); // Drag - root.lookup("#rectangle").setOnMousePressed(new EventHandler<MouseEvent>() { - @Override - public void handle(MouseEvent event) { - xOffset = event.getSceneX(); - yOffset = event.getSceneY(); - } + root.lookup("#rectangle").setOnMousePressed(event -> { + xOffset = event.getSceneX(); + yOffset = event.getSceneY(); }); - root.lookup("#rectangle").setOnMouseDragged(new EventHandler<MouseEvent>() { - @Override - public void handle(MouseEvent event) { - primaryStage.setX(event.getScreenX() - xOffset); - primaryStage.setY(event.getScreenY() - yOffset); - } + root.lookup("#rectangle").setOnMouseDragged(event -> { + primaryStage.setX(event.getScreenX() - xOffset); + primaryStage.setY(event.getScreenY() - yOffset); }); } public static void main(String[] args) { diff --git a/src/sample/net/Updater.java b/src/sample/net/Updater.java index adcb56f..b0de87d 100644 --- a/src/sample/net/Updater.java +++ b/src/sample/net/Updater.java @@ -9,6 +9,7 @@ import java.net.URLConnection; */ public class Updater { + private static Updater instance; private URLConnection conn; private Updater(String URL) throws IOException { @@ -22,4 +23,13 @@ public class Updater { public void downloadMorePorn(){ //TODO: Download more porn } + + public void downloadEvenMorePorn(){ + //TODO: Download even more porn + } + + public static Updater getInstance(String url) throws IOException { + if(instance==null) instance = new Updater(url); + return instance; + } } diff --git a/src/sample/sample.fxml b/src/sample/sample.fxml index 2a0a32e..7765b8f 100644 --- a/src/sample/sample.fxml +++ b/src/sample/sample.fxml @@ -7,16 +7,16 @@ <?import javafx.scene.shape.Rectangle?> <?import javafx.scene.text.Font?> -<Pane id="Pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500" prefWidth="900" xmlns="http://javafx.com/javafx/8.0.112-ea" xmlns:fx="http://javafx.com/fxml/1"> +<Pane id="pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500" prefWidth="900" style="-fx-background-color: rgba(38, 33, 33, 1);;" xmlns="http://javafx.com/javafx/8.0.102" xmlns:fx="http://javafx.com/fxml/1"> <children> - <Rectangle id="rectangle" arcHeight="5.0" arcWidth="5.0" fill="white" height="50.0" strokeType="INSIDE" width="900.0" /> - <Button id="exit" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="862.0" layoutY="13.0" mnemonicParsing="false" stylesheets="@../assets/style/nav.css" text="X" /> - <Label layoutX="46.0" layoutY="11.0" text="Team Avion Launcher"> + <Rectangle id="rectangle" arcHeight="5.0" arcWidth="5.0" fill="white" height="50.0" strokeType="INSIDE" style="-fx-fill: rgba(30, 25, 25, 1);" width="900.0" /> + <Button id="exit" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="862.0" layoutY="13.0" mnemonicParsing="false" style="-fx-background-color: rgba(30, 25, 25, 1);" stylesheets="@../assets/style/nav.css" text="X" textFill="WHITE" /> + <Label layoutX="46.0" layoutY="11.0" text="Team Avion Launcher" textFill="WHITE"> <font> <Font name="Centaur" size="24.0" /> </font> </Label> - <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#e4e4e4" height="450.0" layoutX="-1.0" layoutY="50.0" strokeType="INSIDE" width="145.0" /> + <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#e4e4e4" height="450.0" layoutX="-1.0" layoutY="50.0" strokeType="INSIDE" style="-fx-fill: rgba(30, 25, 25, 1);" width="145.0" /> <Hyperlink id="hyperlink" layoutX="26.0" layoutY="66.0" text="Our Modpacks" /> <Hyperlink layoutX="26.0" layoutY="102.0" text="Settings" /> </children>