Chnaged things

This commit is contained in:
Michael-Jouanneau 2016-10-30 17:40:23 +01:00
parent ad0083cddd
commit c792b9c02c
4 changed files with 16 additions and 6 deletions

View File

@ -21,14 +21,13 @@ import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import java.net.URL;
import java.util.Set;
public class Main extends Application {
public static final URL mainLauncher = Main.class.getResource("../assets/layout/main.fxml"); // Launcher body
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 Image appIcon;
private Rectangle dragBar; // Draggable top bar
@ -57,7 +56,6 @@ public class Main extends Application {
tab = (Pane) root.lookup("#tab");
icon = (ImageView) root.lookup("#icon");
// Infrastructural navigation
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
@ -75,7 +73,6 @@ public class Main extends Application {
primaryStage.setY(event.getScreenY() - yOffset);
});
// Set up default layout
Tabs.Home.switchTab(tab);
icon.setImage(appIcon);

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.Pane?>
<?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">
<children>
<Label layoutX="333.0" layoutY="14.0" text="Home" textFill="WHITE" underline="true">

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.Pane?>
<?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">
<children>
<Label layoutX="333.0" layoutY="14.0" text="Modpacks" textFill="WHITE" underline="true">
@ -12,5 +13,7 @@
<Font name="Centaur" size="31.0" />
</font>
</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>
</Pane>

View File

@ -16,4 +16,14 @@
#Home-btn:hover, #Modpacks-btn:hover, #Settings-btn:hover {
-fx-background-color: #0c182d;
-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;
}