aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cc/polyfrost')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/OneConfig.java5
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/config/OneConfigConfig.java2
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/config/data/Mod.java1
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/config/data/ModType.java2
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java2
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java6
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java2
7 files changed, 8 insertions, 12 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/OneConfig.java b/src/main/java/cc/polyfrost/oneconfig/OneConfig.java
index e8121d6..0d6763f 100644
--- a/src/main/java/cc/polyfrost/oneconfig/OneConfig.java
+++ b/src/main/java/cc/polyfrost/oneconfig/OneConfig.java
@@ -72,10 +72,11 @@ public class OneConfig {
ModMetadata metadata = mod.getMetadata();
loadedOtherMods.add(metadata);
String author = metadata.authorList.size() > 0 ? metadata.authorList.get(0) : "";
- Mod newMod = new Mod(metadata.name, ModType.OTHER, author, metadata.version);
+ Mod newMod = new Mod(metadata.name, ModType.THIRD_PARTY, author, metadata.version);
+ newMod.isShortCut = true;
if (newMod.name.equals("Minecraft Coder Pack") || newMod.name.equals("Forge Mod Loader") || newMod.name.equals("Minecraft Forge") || newMod.name.equals("OneConfig"))
continue;
- if (modData.add(newMod)) loadedMods.add(newMod); // anti duplicate fix
+ if (modData.add(newMod)) loadedMods.add(newMod);
}
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/OneConfigConfig.java b/src/main/java/cc/polyfrost/oneconfig/config/OneConfigConfig.java
index 2993e23..bf225a9 100644
--- a/src/main/java/cc/polyfrost/oneconfig/config/OneConfigConfig.java
+++ b/src/main/java/cc/polyfrost/oneconfig/config/OneConfigConfig.java
@@ -53,7 +53,7 @@ public class OneConfigConfig extends Config {
public static float CORNER_RADIUS_WIN = 20f;
public static float CORNER_RADIUS = 12f;
- public static boolean thirdPartyAll = false;
+ public static boolean allShowShortCut = false;
public OneConfigConfig() {
super(null, "OneConfig.json");
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/data/Mod.java b/src/main/java/cc/polyfrost/oneconfig/config/data/Mod.java
index 3ddb68b..e38c062 100644
--- a/src/main/java/cc/polyfrost/oneconfig/config/data/Mod.java
+++ b/src/main/java/cc/polyfrost/oneconfig/config/data/Mod.java
@@ -9,6 +9,7 @@ public class Mod {
public final String version;
public Config config;
public final OptionPage defaultPage;
+ public boolean isShortCut = false;
/**
* @param name Friendly name of the mod
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/data/ModType.java b/src/main/java/cc/polyfrost/oneconfig/config/data/ModType.java
index cbb4568..3d2b3a9 100644
--- a/src/main/java/cc/polyfrost/oneconfig/config/data/ModType.java
+++ b/src/main/java/cc/polyfrost/oneconfig/config/data/ModType.java
@@ -6,5 +6,5 @@ public enum ModType {
UTIL_QOL,
HYPIXEL,
SKYBLOCK,
- OTHER
+ THIRD_PARTY
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java
index 8d2ad16..b18502f 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java
@@ -85,7 +85,7 @@ public class ModCard extends BasicElement {
public void onClick() {
if (isHoveredMain) {
for (Mod data : OneConfig.loadedMods) {
- if (data.modType != ModType.OTHER) {
+ if (data.modType != ModType.THIRD_PARTY) {
if (data.name.equalsIgnoreCase(modData.name)) {
OneConfigGui.INSTANCE.openPage(new ModConfigPage(data.defaultPage));
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java
index 797f573..74eea3a 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java
@@ -1,19 +1,13 @@
package cc.polyfrost.oneconfig.gui.pages;
-import cc.polyfrost.oneconfig.config.OneConfigConfig;
import cc.polyfrost.oneconfig.config.data.OptionPage;
import cc.polyfrost.oneconfig.config.data.OptionSubcategory;
import cc.polyfrost.oneconfig.config.interfaces.BasicOption;
-import cc.polyfrost.oneconfig.gui.OneConfigGui;
import cc.polyfrost.oneconfig.gui.elements.BasicButton;
-import cc.polyfrost.oneconfig.gui.elements.config.ConfigPageButton;
import cc.polyfrost.oneconfig.lwjgl.RenderManager;
import cc.polyfrost.oneconfig.lwjgl.font.Fonts;
-import java.awt.*;
import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
public class ModConfigPage extends Page {
private final OptionPage page;
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java
index 47068cf..2b3dfd7 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java
@@ -85,7 +85,7 @@ public class ModsPage extends Page {
}
private boolean inSelection(ModCard modCard) {
- return modCategories.get(0).isToggled() && (OneConfigConfig.thirdPartyAll || modCard.getModData().modType != ModType.OTHER) || (modCategories.get(1).isToggled() && modCard.getModData().modType == ModType.PVP) || (modCategories.get(2).isToggled() && modCard.getModData().modType == ModType.HUD) || (modCategories.get(3).isToggled() && modCard.getModData().modType == ModType.UTIL_QOL) || (modCategories.get(4).isToggled() && modCard.getModData().modType == ModType.HYPIXEL) || (modCategories.get(5).isToggled() && modCard.getModData().modType == ModType.SKYBLOCK) || (modCategories.get(6).isToggled() && modCard.getModData().modType == ModType.OTHER);
+ return modCategories.get(0).isToggled() && (OneConfigConfig.allShowShortCut || !modCard.getModData().isShortCut) || (modCategories.get(1).isToggled() && modCard.getModData().modType == ModType.PVP) || (modCategories.get(2).isToggled() && modCard.getModData().modType == ModType.HUD) || (modCategories.get(3).isToggled() && modCard.getModData().modType == ModType.UTIL_QOL) || (modCategories.get(4).isToggled() && modCard.getModData().modType == ModType.HYPIXEL) || (modCategories.get(5).isToggled() && modCard.getModData().modType == ModType.SKYBLOCK) || (modCategories.get(6).isToggled() && modCard.getModData().modType == ModType.THIRD_PARTY);
}
@Override