diff options
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/OneConfig.java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/OneConfig.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/OneConfig.java b/src/main/java/cc/polyfrost/oneconfig/OneConfig.java index 8a993e5..0d6763f 100644 --- a/src/main/java/cc/polyfrost/oneconfig/OneConfig.java +++ b/src/main/java/cc/polyfrost/oneconfig/OneConfig.java @@ -12,6 +12,7 @@ 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 +79,17 @@ public class OneConfig { if (modData.add(newMod)) loadedMods.add(newMod); } } + + 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; + } } |