aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-05-11 13:12:13 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-05-11 13:12:13 +0200
commit5c16cd384103e0bdbef68fe378f49eb491eacef8 (patch)
tree10229e3ad25b290679b48dd62d348973bed28aaa /src/main
parent463db48157f84e5cb13a828b5405ece29084fa22 (diff)
downloadOneConfig-5c16cd384103e0bdbef68fe378f49eb491eacef8.tar.gz
OneConfig-5c16cd384103e0bdbef68fe378f49eb491eacef8.tar.bz2
OneConfig-5c16cd384103e0bdbef68fe378f49eb491eacef8.zip
rename some things
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/OneConfig.java10
-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, 10 insertions, 15 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/OneConfig.java b/src/main/java/cc/polyfrost/oneconfig/OneConfig.java
index 25866e8..8a993e5 100644
--- a/src/main/java/cc/polyfrost/oneconfig/OneConfig.java
+++ b/src/main/java/cc/polyfrost/oneconfig/OneConfig.java
@@ -5,11 +5,10 @@ import cc.polyfrost.oneconfig.config.OneConfigConfig;
import cc.polyfrost.oneconfig.config.core.ConfigCore;
import cc.polyfrost.oneconfig.config.data.Mod;
import cc.polyfrost.oneconfig.config.data.ModType;
-import cc.polyfrost.oneconfig.lwjgl.BlurHandler;
-import cc.polyfrost.oneconfig.lwjgl.OneColor;
-import cc.polyfrost.oneconfig.lwjgl.font.Fonts;
import cc.polyfrost.oneconfig.hud.HudCore;
+import cc.polyfrost.oneconfig.lwjgl.BlurHandler;
import cc.polyfrost.oneconfig.lwjgl.RenderManager;
+import cc.polyfrost.oneconfig.lwjgl.font.Fonts;
import cc.polyfrost.oneconfig.lwjgl.image.Images;
import cc.polyfrost.oneconfig.test.TestConfig;
import net.minecraft.client.Minecraft;
@@ -72,10 +71,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 48a6218..7e4bd65 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java
@@ -86,7 +86,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