From b0880c3e35392a9d06cb634781a8397ca1ad689a Mon Sep 17 00:00:00 2001 From: Michael-Jouanneau Date: Tue, 15 Nov 2016 18:37:04 +0100 Subject: [PATCH] Changed Things --- src/Launcher/Main.java | 9 ++++++++- src/Launcher/net/Updater.java | 4 ++++ src/assets/layout/dialog_update.fxml | 1 + src/assets/layout/settings_generic.fxml | 13 +++++++++---- src/assets/style/default-theme.css | 24 ++++++++++++++++++++++++ 5 files changed, 46 insertions(+), 5 deletions(-) diff --git a/src/Launcher/Main.java b/src/Launcher/Main.java index 33f5551..a47b7fa 100644 --- a/src/Launcher/Main.java +++ b/src/Launcher/Main.java @@ -30,6 +30,7 @@ import javafx.scene.shape.Rectangle; import javafx.stage.Stage; import javafx.stage.StageStyle; import java.io.File; + import com.tofvesson.async.*; import javafx.util.Duration; @@ -45,9 +46,10 @@ public class Main extends Application { public static final int semVerMinor = 2; // Minor version public static final int semVerPatch = 3; // Patch version + private double xOffset = 0, yOffset = 0; // Offsets for dragging private static String[] args; - 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, Default_theme, Dark_theme, Light_theme; // Define buttons private ImageView icon; private TextField Search_modpacks; private Image appIcon; @@ -96,6 +98,9 @@ public class Main extends Application { Modpack_btn = (Button) root.lookup("#Modpacks-btn"); Settings_btn = (Button) root.lookup("#Settings-btn"); Instance_btn = (Button) root.lookup("#Instance-btn"); + Default_theme = (Button) root.lookup("#default-theme"); + Light_theme = (Button) root.lookup("#light-theme"); + Dark_theme = (Button) root.lookup("#dark-theme"); dialog_changer = (Label) root.lookup("#dialog-changer"); @@ -147,7 +152,9 @@ public class Main extends Application { if(!settings_activeTab.getId().equals(n.lookup("#Settings-Gen-btn").getId())){ // Use id to identify layouts updateTabSelection(n.lookup("#Settings-Gen-btn"), TabType.SETTINGS); Node genericLayout = Tabs.switchTab("settings_generic", (Pane) n.lookup("#Settings-Pane")); + Tabs.load("settings_generic").lookup("#default-theme").setOnMouseClicked(event2 ->{ + }); } }); diff --git a/src/Launcher/net/Updater.java b/src/Launcher/net/Updater.java index 07a0b37..1dbf145 100644 --- a/src/Launcher/net/Updater.java +++ b/src/Launcher/net/Updater.java @@ -1,9 +1,13 @@ package Launcher.net; import Launcher.Main; +import Launcher.Tabs; import com.tofvesson.async.Async; import com.tofvesson.reflection.SafeReflection; import javafx.animation.Timeline; +import javafx.scene.control.Label; +import javafx.scene.layout.Pane; + import javax.net.ssl.HttpsURLConnection; import java.io.*; import java.net.MalformedURLException; diff --git a/src/assets/layout/dialog_update.fxml b/src/assets/layout/dialog_update.fxml index 143857d..21501b0 100644 --- a/src/assets/layout/dialog_update.fxml +++ b/src/assets/layout/dialog_update.fxml @@ -19,4 +19,5 @@ +