From 29156d83c4213e319149fa5e0a926dd913404528 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Sun, 24 Apr 2022 16:00:37 +0200 Subject: close + hud button --- src/main/java/io/polyfrost/oneconfig/gui/SideBar.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/java/io/polyfrost/oneconfig/gui/SideBar.java') diff --git a/src/main/java/io/polyfrost/oneconfig/gui/SideBar.java b/src/main/java/io/polyfrost/oneconfig/gui/SideBar.java index 7f84049..fd8f92e 100644 --- a/src/main/java/io/polyfrost/oneconfig/gui/SideBar.java +++ b/src/main/java/io/polyfrost/oneconfig/gui/SideBar.java @@ -7,6 +7,9 @@ import io.polyfrost.oneconfig.gui.pages.ModsPage; import io.polyfrost.oneconfig.lwjgl.RenderManager; import io.polyfrost.oneconfig.lwjgl.font.Fonts; import io.polyfrost.oneconfig.utils.MathUtils; +import io.polyfrost.oneconfig.utils.TickDelay; +import net.minecraft.client.Minecraft; +import scala.collection.parallel.ParIterableLike; import java.util.ArrayList; import java.util.List; @@ -26,9 +29,9 @@ public class SideBar { btnList.add(new BasicButton(192, 36, "Screenshots", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT)); btnList.add(new BasicButton(192, 36, "HUD Settings", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT)); btnList.add(new BasicButton(192, 36, "General", "/assets/oneconfig/textures/share.png", null, -3, BasicButton.ALIGNMENT_LEFT)); - btnList.add(new BasicButton(192, 36, "Close", "/assets/oneconfig/textures/share.png", null, -1, BasicButton.ALIGNMENT_LEFT)); + btnList.add(new BasicButton(192, 36, "Close", "/assets/oneconfig/textures/share.png", null, -1, BasicButton.ALIGNMENT_LEFT, () -> Minecraft.getMinecraft().displayGuiScreen(null))); btnList.add(new BasicButton(192, 36, "Minimize", "/assets/oneconfig/textures/share.png", null, -1, BasicButton.ALIGNMENT_LEFT)); - btnList.add(new BasicButton(192, 36, "Edit HUD", "/assets/oneconfig/textures/share.png", null, 0, BasicButton.ALIGNMENT_LEFT)); + btnList.add(new BasicButton(192, 36, "Edit HUD", "/assets/oneconfig/textures/share.png", null, 0, BasicButton.ALIGNMENT_LEFT, () -> Minecraft.getMinecraft().displayGuiScreen(new HudGui()))); } public void draw(long vg, int x, int y) { -- cgit