aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/OneConfig.java
diff options
context:
space:
mode:
authornextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-05-10 20:19:07 +0100
committernextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-05-10 20:19:07 +0100
commitcefe13f6c232ed5ca2d458b896a76df2ee25a8a3 (patch)
treed64f34e2ee55124ce9c3469fea9333d94ccfb23f /src/main/java/cc/polyfrost/oneconfig/OneConfig.java
parentb5a1aea2239b0beace4d4407d2ab75294c6eab12 (diff)
parent3872c0ae8746e69671ac9b44ff94dc3c7b194817 (diff)
downloadOneConfig-cefe13f6c232ed5ca2d458b896a76df2ee25a8a3.tar.gz
OneConfig-cefe13f6c232ed5ca2d458b896a76df2ee25a8a3.tar.bz2
OneConfig-cefe13f6c232ed5ca2d458b896a76df2ee25a8a3.zip
reduce dependency on minecraft + stuff
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/OneConfig.java')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/OneConfig.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/OneConfig.java b/src/main/java/cc/polyfrost/oneconfig/OneConfig.java
index 25866e8..e8121d6 100644
--- a/src/main/java/cc/polyfrost/oneconfig/OneConfig.java
+++ b/src/main/java/cc/polyfrost/oneconfig/OneConfig.java
@@ -5,14 +5,14 @@ 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;
+import net.minecraft.client.gui.ScaledResolution;
import net.minecraftforge.client.ClientCommandHandler;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Loader;
@@ -78,4 +78,17 @@ public class OneConfig {
if (modData.add(newMod)) loadedMods.add(newMod); // anti duplicate fix
}
}
+
+ public static int[] getScaledResolution() {
+ ScaledResolution resolution = new ScaledResolution(mc);
+ return new int[]{resolution.getScaledWidth(), resolution.getScaledHeight()};
+ }
+
+ public static int getDisplayWidth() {
+ return mc.displayWidth;
+ }
+
+ public static int getDisplayHeight() {
+ return mc.displayHeight;
+ }
}