From 8662352c0c654611d27175548fab02b83ddadce1 Mon Sep 17 00:00:00 2001 From: Michael-Jouanneau <tacomundu12@gmail.com> Date: Sun, 30 Oct 2016 22:05:40 +0100 Subject: [PATCH 1/2] Chnaged things --- src/Launcher/Main.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Launcher/Main.java b/src/Launcher/Main.java index 3202afe..725343e 100644 --- a/src/Launcher/Main.java +++ b/src/Launcher/Main.java @@ -73,8 +73,7 @@ public class Main extends Application { if(activeTab!=Tabs.Modpacks){ (activeTab=Tabs.Modpacks).switchTab(tab); // Sets the active tab to the modpacks tab unless it's already active Tabs.Modpacks.loaded.lookup("#search-modpacks").setOnInputMethodTextChanged(System.out::println); - //TODO: Create a dynamic updating string for the input - + //TODO: Create a dynamic updating string from the input ( Text Field ) } }); Settings_btn.setOnMouseClicked(event ->{ From ae67307653a7ce822b729e35df1665452095e29d Mon Sep 17 00:00:00 2001 From: Michael-Jouanneau <tacomundu12@gmail.com> Date: Tue, 1 Nov 2016 14:08:43 +0100 Subject: [PATCH 2/2] Chnaged things --- src/Launcher/Main.java | 20 +++++++++++++++----- src/assets/layout/modpacks.fxml | 2 ++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/Launcher/Main.java b/src/Launcher/Main.java index 725343e..3648db2 100644 --- a/src/Launcher/Main.java +++ b/src/Launcher/Main.java @@ -22,8 +22,6 @@ import javafx.scene.layout.Pane; import javafx.scene.shape.Rectangle; import javafx.stage.Stage; import javafx.stage.StageStyle; - -import javafx.scene.input.KeyEvent; import java.net.URL; import com.tofvesson.async.*; @@ -56,29 +54,41 @@ public class Main extends Application { // Field initialization exit = (Button) root.lookup("#exit"); min = (Button) root.lookup("#min"); + dragBar = (Rectangle) root.lookup("#rectangle"); + Home_btn = (Button) root.lookup("#Home-btn"); Modpack_btn = (Button) root.lookup("#Modpacks-btn"); Settings_btn = (Button) root.lookup("#Settings-btn"); + tab = (Pane) root.lookup("#tab"); + icon = (ImageView) root.lookup("#icon"); + 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 - Home_btn.setOnMouseClicked(event ->{if(activeTab!=Tabs.Home)(activeTab=Tabs.Home).switchTab(tab);}); // Sets the active tab to the home tab unless it's already active + + Home_btn.setOnMouseClicked(event ->{ + if(activeTab!=Tabs.Home){ + (activeTab=Tabs.Home).switchTab(tab); + } + }); // Sets the active tab to the home tab unless it's already active + Modpack_btn.setOnMouseClicked(event ->{ if(activeTab!=Tabs.Modpacks){ (activeTab=Tabs.Modpacks).switchTab(tab); // Sets the active tab to the modpacks tab unless it's already active - Tabs.Modpacks.loaded.lookup("#search-modpacks").setOnInputMethodTextChanged(System.out::println); //TODO: Create a dynamic updating string from the input ( Text Field ) } }); + Settings_btn.setOnMouseClicked(event ->{ if(activeTab!=Tabs.Settings){ (activeTab=Tabs.Settings).switchTab(tab); // Sets the active tab to the settings tab unless it's already active + } }); @@ -107,7 +117,7 @@ public class Main extends Application { } public static int run(){ - return 500; + return 1500; } } diff --git a/src/assets/layout/modpacks.fxml b/src/assets/layout/modpacks.fxml index d235d40..7975cee 100644 --- a/src/assets/layout/modpacks.fxml +++ b/src/assets/layout/modpacks.fxml @@ -1,7 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <?import javafx.scene.control.Label?> +<?import javafx.scene.control.ScrollPane?> <?import javafx.scene.control.TextField?> +<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.Pane?> <?import javafx.scene.shape.Rectangle?> <?import javafx.scene.text.Font?>