diff options
author | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-05-10 18:51:51 +0100 |
---|---|---|
committer | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-05-10 18:51:51 +0100 |
commit | b5a1aea2239b0beace4d4407d2ab75294c6eab12 (patch) | |
tree | 8bff04f17385dd348cbc73fdffe5462772d1412b /src/main/java/cc/polyfrost/oneconfig/gui | |
parent | 20cf8146e88f3ca06399fdf163badef759f01d2c (diff) | |
download | OneConfig-b5a1aea2239b0beace4d4407d2ab75294c6eab12.tar.gz OneConfig-b5a1aea2239b0beace4d4407d2ab75294c6eab12.tar.bz2 OneConfig-b5a1aea2239b0beace4d4407d2ab75294c6eab12.zip |
reduce dependency on minecraft
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java | 7 | ||||
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/pages/HomePage.java | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java b/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java index 978f420..1850367 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java @@ -8,7 +8,6 @@ import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; import cc.polyfrost.oneconfig.lwjgl.image.Images; import cc.polyfrost.oneconfig.utils.MathUtils; -import net.minecraft.client.Minecraft; import java.util.ArrayList; import java.util.List; @@ -29,12 +28,12 @@ public class SideBar { btnList.add(new BasicButton(192, 36, "Screenshots", Images.SCREENSHOT, null, -3, BasicButton.ALIGNMENT_LEFT)); btnList.add(new BasicButton(192, 36, "HUD Settings", Images.HUD_SETTINGS, null, -3, BasicButton.ALIGNMENT_LEFT)); btnList.add(new BasicButton(192, 36, "Preferences", Images.PREFERENCES, null, -3, BasicButton.ALIGNMENT_LEFT)); - btnList.add(new BasicButton(192, 36, "Close", Images.CLOSE, null, -1, BasicButton.ALIGNMENT_LEFT, () -> Minecraft.getMinecraft().displayGuiScreen(null))); + btnList.add(new BasicButton(192, 36, "Close", Images.CLOSE, null, -1, BasicButton.ALIGNMENT_LEFT, () -> RenderManager.displayGuiScreen(null))); btnList.add(new BasicButton(192, 36, "Minimize", Images.MINIMIZE, null, -1, BasicButton.ALIGNMENT_LEFT, () -> { OneConfigGui.instanceToRestore = OneConfigGui.INSTANCE; - Minecraft.getMinecraft().displayGuiScreen(null); + RenderManager.displayGuiScreen(null); })); - btnList.add(new BasicButton(192, 36, "Edit HUD", Images.HUD, null, 0, BasicButton.ALIGNMENT_LEFT, () -> Minecraft.getMinecraft().displayGuiScreen(new HudGui()))); + btnList.add(new BasicButton(192, 36, "Edit HUD", Images.HUD, null, 0, BasicButton.ALIGNMENT_LEFT, () -> RenderManager.displayGuiScreen(new HudGui()))); } public void draw(long vg, int x, int y) { diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/pages/HomePage.java b/src/main/java/cc/polyfrost/oneconfig/gui/pages/HomePage.java index 9b54bff..dd73183 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/HomePage.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/HomePage.java @@ -12,8 +12,6 @@ import cc.polyfrost.oneconfig.utils.InputUtils; import java.awt.*; -import java.awt.*; - public class HomePage extends Page { private final BasicButton btn = new BasicButton(184, 36, "Socials", Images.SHARE, Images.LAUNCH, 1, BasicButton.ALIGNMENT_CENTER); |