Changed Things

This commit is contained in:
Michael-Jouanneau 2016-11-06 18:14:40 +01:00
parent 60a59d1b96
commit b00f587722
2 changed files with 6 additions and 10 deletions

View File

@ -15,7 +15,6 @@ import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Tab;
import javafx.scene.control.TextField;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
@ -31,7 +30,7 @@ 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, Instance_btn; // Define buttons
private Button exit, min, Home_btn, Modpack_btn, Settings_btn, Instance_btn; // Define buttons
private ImageView icon;
private TextField Search_modpacks;
private Image appIcon;
@ -52,7 +51,6 @@ public class Main extends Application {
primaryStage.getIcons().clear();
primaryStage.getIcons().add(appIcon = new Image(getClass().getResourceAsStream("../assets/icons/app.png")));
// Field initialization
exit = (Button) root.lookup("#exit");
min = (Button) root.lookup("#min");
@ -70,7 +68,6 @@ public class Main extends Application {
Search_modpacks = (TextField) root.lookup("#search-modpacks");
// 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
@ -86,9 +83,6 @@ public class Main extends Application {
if(stringUpdater!=null && stringUpdater.isAlive()) stringUpdater.cancel();
(activeTab=Tabs.Modpacks).switchTab(tab); // Sets the active tab to the modpacks tab unless it's already active
//TODO: Create a dynamic updating string from the input ( Text Field ) *-* Done *-*
stringUpdater = new Async(SafeReflection.getFirstMethod(Main.class, "detectStringUpdate"), Tabs.Modpacks.loaded.lookup("#search-modpacks"));
}
@ -108,7 +102,6 @@ public class Main extends Application {
}
});
// Drag
dragBar.setOnMousePressed(event -> {
xOffset = event.getSceneX();
@ -119,7 +112,6 @@ public class Main extends Application {
primaryStage.setY(event.getScreenY() - yOffset);
});
// Set up default layout
Tabs.Home.switchTab(tab);
icon.setImage(appIcon);
@ -134,5 +126,4 @@ public class Main extends Application {
while(true) if(!s.equals(toRead.getText())) System.out.println(s = toRead.getText());
}
}

View File

@ -0,0 +1,5 @@
package Launcher.minecraft;
public class Launcher {
}