Added things
This commit is contained in:
parent
fe08893d25
commit
d7f188fa43
@ -59,7 +59,6 @@ public class Main extends Application {
|
|||||||
public static final int semVerMajor = 0; // Major version
|
public static final int semVerMajor = 0; // Major version
|
||||||
public static final int semVerMinor = 2; // Minor version
|
public static final int semVerMinor = 2; // Minor version
|
||||||
public static final int semVerPatch = 5; // Patch version
|
public static final int semVerPatch = 5; // Patch version
|
||||||
public static final int semVerSubPatch = 1;
|
|
||||||
|
|
||||||
|
|
||||||
double xOffset = 0, yOffset = 0; // Offsets for dragging
|
double xOffset = 0, yOffset = 0; // Offsets for dragging
|
||||||
@ -69,7 +68,7 @@ public class Main extends Application {
|
|||||||
private TextField Search_modpacks, Username_minecraft;
|
private TextField Search_modpacks, Username_minecraft;
|
||||||
private Image appIcon;
|
private Image appIcon;
|
||||||
private Rectangle dragBar; // Draggable top bar
|
private Rectangle dragBar; // Draggable top bar
|
||||||
Pane root, tab;
|
Pane root, tab, dragbar_1;
|
||||||
private PasswordField Password_minecraft;
|
private PasswordField Password_minecraft;
|
||||||
Node activeTab, settings_activeTab;
|
Node activeTab, settings_activeTab;
|
||||||
private Label dialog_changer;
|
private Label dialog_changer;
|
||||||
@ -100,7 +99,7 @@ public class Main extends Application {
|
|||||||
|
|
||||||
root = (Pane) Tabs.load("main"); // Load via layout loader
|
root = (Pane) Tabs.load("main"); // Load via layout loader
|
||||||
((Label)root.lookup("#version")).setText(((Label) root.lookup("#version")) // Dynamically set version label
|
((Label)root.lookup("#version")).setText(((Label) root.lookup("#version")) // Dynamically set version label
|
||||||
.getText().replace("$v", semVerDevState+" "+semVerMajor+"."+semVerMinor+"."+semVerPatch+"-"+semVerSubPatch)); // Use variables to define version
|
.getText().replace("$v", semVerDevState+" "+semVerMajor+"."+semVerMinor+"."+semVerPatch)); // Use variables to define version
|
||||||
primaryStage.setTitle("Team-Avion Launcher");
|
primaryStage.setTitle("Team-Avion Launcher");
|
||||||
primaryStage.setScene(new Scene(root, 900, 500));
|
primaryStage.setScene(new Scene(root, 900, 500));
|
||||||
primaryStage.getIcons().clear();
|
primaryStage.getIcons().clear();
|
||||||
@ -112,6 +111,7 @@ public class Main extends Application {
|
|||||||
|
|
||||||
dragBar = (Rectangle) root.lookup("#rectangle");
|
dragBar = (Rectangle) root.lookup("#rectangle");
|
||||||
|
|
||||||
|
|
||||||
Home_btn = (Button) root.lookup("#Home-btn");
|
Home_btn = (Button) root.lookup("#Home-btn");
|
||||||
Modpack_btn = (Button) root.lookup("#Modpacks-btn");
|
Modpack_btn = (Button) root.lookup("#Modpacks-btn");
|
||||||
Settings_btn = (Button) root.lookup("#Settings-btn");
|
Settings_btn = (Button) root.lookup("#Settings-btn");
|
||||||
@ -201,7 +201,16 @@ public class Main extends Application {
|
|||||||
login.setResizable(false);
|
login.setResizable(false);
|
||||||
login.setTitle("Minecraft Login");
|
login.setTitle("Minecraft Login");
|
||||||
|
|
||||||
|
dragbar_1 = (Pane) Tabs.load("instance_userinfo").lookup("#dragbar-1");
|
||||||
|
|
||||||
|
dragbar_1.setOnMousePressed(event4 -> {
|
||||||
|
xOffset = event.getSceneX();
|
||||||
|
yOffset = event.getSceneY();
|
||||||
|
});
|
||||||
|
dragbar_1.setOnMouseDragged(event4 -> {
|
||||||
|
login.setX(event.getScreenX() - xOffset);
|
||||||
|
login.setY(event.getScreenY() - yOffset);
|
||||||
|
});
|
||||||
|
|
||||||
minecraftlogin.lookup("#close-minecraft-login-window").setOnMouseClicked(event4 ->{
|
minecraftlogin.lookup("#close-minecraft-login-window").setOnMouseClicked(event4 ->{
|
||||||
System.out.println("Closing window");
|
System.out.println("Closing window");
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="308.0" prefWidth="300.0" stylesheets="@../style/default-theme.css" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1">
|
<Pane id="dragbar-1" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="308.0" prefWidth="300.0" stylesheets="@../style/default-theme.css" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<children>
|
<children>
|
||||||
<ImageView fitHeight="308.0" fitWidth="306.0" layoutX="-5.0" pickOnBounds="true">
|
<ImageView fitHeight="308.0" fitWidth="306.0" layoutX="-5.0" pickOnBounds="true">
|
||||||
<image>
|
<image>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user