aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/polyfrost/oneconfig/themes/Themes.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/themes/Themes.java')
-rw-r--r--src/main/java/io/polyfrost/oneconfig/themes/Themes.java53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/themes/Themes.java b/src/main/java/io/polyfrost/oneconfig/themes/Themes.java
deleted file mode 100644
index 240c97d..0000000
--- a/src/main/java/io/polyfrost/oneconfig/themes/Themes.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package io.polyfrost.oneconfig.themes;
-
-import io.polyfrost.oneconfig.OneConfig;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Objects;
-
-public class Themes {
- public static final int VERSION = 0;
- public static Theme activeTheme;
- public static final Logger themeLog = LogManager.getLogger("OneConfig Themes");
-
- /**
- * Return a list of all available themes in the directory.
- * @return list of themes
- */
- public static List<File> getThemes() {
- FilenameFilter filter = (dir, name) -> name.endsWith(".zip");
- return Arrays.asList(Objects.requireNonNull(OneConfig.themesDir.listFiles(filter)));
- }
-
- /**
- * Return the active theme instance.
- */
- public static Theme getActiveTheme() {
- return activeTheme;
- }
-
- /**
- * Open a new theme in the window, and restart the GUI.
- * @param theme Theme file to open
- */
- public static void openTheme(File theme) {
- try {
- activeTheme = new Theme(theme);
- } catch (IOException e) {
- e.printStackTrace();
- }
- // TODO restart gui
- }
-
-
- public String toString() {
- return "OneConfig Theme {loaded=" + activeTheme.getLoadedTime() + ", name=" + activeTheme.getName() + ", desc=" + activeTheme.getDescription() + ", ready=" + activeTheme.isReady() + "}";
- }
-
-}