Chnaged things
This commit is contained in:
parent
ad0083cddd
commit
c792b9c02c
@ -21,14 +21,13 @@ import javafx.scene.shape.Rectangle;
|
|||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import javafx.stage.StageStyle;
|
import javafx.stage.StageStyle;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
public class Main extends Application {
|
public class Main extends Application {
|
||||||
|
|
||||||
public static final URL mainLauncher = Main.class.getResource("../assets/layout/main.fxml"); // Launcher body
|
public static final URL mainLauncher = Main.class.getResource("../assets/layout/main.fxml"); // Launcher body
|
||||||
|
|
||||||
private double xOffset = 0, yOffset = 0; // Offsets for dragging
|
private double xOffset = 0, yOffset = 0; // Offsets for dragging
|
||||||
private Button exit, min, Home_btn, Modpack_btn, Settings_btn; // Define buttons
|
private Button exit, min, Home_btn, Modpack_btn, Settings_btn; // Define buttons
|
||||||
private ImageView icon;
|
private ImageView icon;
|
||||||
private Image appIcon;
|
private Image appIcon;
|
||||||
private Rectangle dragBar; // Draggable top bar
|
private Rectangle dragBar; // Draggable top bar
|
||||||
@ -57,7 +56,6 @@ public class Main extends Application {
|
|||||||
tab = (Pane) root.lookup("#tab");
|
tab = (Pane) root.lookup("#tab");
|
||||||
icon = (ImageView) root.lookup("#icon");
|
icon = (ImageView) root.lookup("#icon");
|
||||||
|
|
||||||
|
|
||||||
// Infrastructural navigation
|
// Infrastructural navigation
|
||||||
exit.setOnMouseClicked(event -> primaryStage.close()); // Closes the program if exit button is clicked
|
exit.setOnMouseClicked(event -> primaryStage.close()); // Closes the program if exit button is clicked
|
||||||
min.setOnMouseClicked(event -> primaryStage.setIconified(true)); // Minimizes the program if minimize button is clicked
|
min.setOnMouseClicked(event -> primaryStage.setIconified(true)); // Minimizes the program if minimize button is clicked
|
||||||
@ -75,7 +73,6 @@ public class Main extends Application {
|
|||||||
primaryStage.setY(event.getScreenY() - yOffset);
|
primaryStage.setY(event.getScreenY() - yOffset);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Set up default layout
|
// Set up default layout
|
||||||
Tabs.Home.switchTab(tab);
|
Tabs.Home.switchTab(tab);
|
||||||
icon.setImage(appIcon);
|
icon.setImage(appIcon);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
|
<?import javafx.scene.control.TextField?>
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
|
|
||||||
<Pane id="pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="450.0" prefWidth="750.0" stylesheets="@../style/nav.css" 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="450.0" prefWidth="750.0" stylesheets="@../style/nav.css" xmlns="http://javafx.com/javafx/8.0.112-ea" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<children>
|
<children>
|
||||||
<Label layoutX="333.0" layoutY="14.0" text="Home" textFill="WHITE" underline="true">
|
<Label layoutX="333.0" layoutY="14.0" text="Home" textFill="WHITE" underline="true">
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
|
<?import javafx.scene.control.TextField?>
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
|
|
||||||
<Pane id="pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="450.0" prefWidth="750.0" stylesheets="@../style/nav.css" 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="450.0" prefWidth="750.0" stylesheets="@../style/nav.css" xmlns="http://javafx.com/javafx/8.0.112-ea" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<children>
|
<children>
|
||||||
<Label layoutX="333.0" layoutY="14.0" text="Modpacks" textFill="WHITE" underline="true">
|
<Label layoutX="333.0" layoutY="14.0" text="Modpacks" textFill="WHITE" underline="true">
|
||||||
@ -12,5 +13,7 @@
|
|||||||
<Font name="Centaur" size="31.0" />
|
<Font name="Centaur" size="31.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
|
<TextField id="search-modpacks" layoutX="286.0" layoutY="200.0" prefHeight="25.0" prefWidth="212.0" promptText="Search Modpacks" />
|
||||||
|
<Button id="search-modpacks-btn" layoutX="313.0" layoutY="247.0" mnemonicParsing="false" textFill="white" text="Search available Modpacks" />
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
|
@ -16,4 +16,14 @@
|
|||||||
#Home-btn:hover, #Modpacks-btn:hover, #Settings-btn:hover {
|
#Home-btn:hover, #Modpacks-btn:hover, #Settings-btn:hover {
|
||||||
-fx-background-color: #0c182d;
|
-fx-background-color: #0c182d;
|
||||||
-fx-background-radius: 0em;
|
-fx-background-radius: 0em;
|
||||||
|
}
|
||||||
|
#search-modpacks-btn {
|
||||||
|
-fx-background-color: #031128;
|
||||||
|
}
|
||||||
|
#search-modpacks-btn:hover {
|
||||||
|
-fx-background-color: #0c182d;
|
||||||
|
}
|
||||||
|
#search-modpacks {
|
||||||
|
-fx-background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
-fx-padding: 10px;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user