From 44dfbbb419f1736530c04c02a651f7757cf83f3d Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Sun, 5 Jun 2022 15:27:36 +0700 Subject: rewrite command manager, stop using essential relocate, and reformat code (#34) * reformat code * reformat code rewrite command manager stop using essential relocate --- src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java | 4 ++-- src/main/java/cc/polyfrost/oneconfig/gui/pages/Page.java | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/pages') 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 2866008..3b8e172 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java @@ -67,9 +67,9 @@ public class ModsPage extends Page { for (BasicButton btn : modCategories) { btn.draw(vg, iXCat, y + 16); iXCat += btn.getWidth() + 8; - if(btn.isToggled()) selected = true; + if (btn.isToggled()) selected = true; } - if(!selected) modCategories.get(0).setToggled(true); + if (!selected) modCategories.get(0).setToggled(true); return 60; } diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/pages/Page.java b/src/main/java/cc/polyfrost/oneconfig/gui/pages/Page.java index 4e85cf5..fda6ea2 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/Page.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/Page.java @@ -1,22 +1,19 @@ package cc.polyfrost.oneconfig.gui.pages; import cc.polyfrost.oneconfig.gui.animations.Animation; -import cc.polyfrost.oneconfig.gui.animations.EaseInOutQuad; import cc.polyfrost.oneconfig.gui.animations.EaseOutQuad; import cc.polyfrost.oneconfig.lwjgl.scissor.Scissor; import cc.polyfrost.oneconfig.lwjgl.scissor.ScissorManager; -import cc.polyfrost.oneconfig.utils.MathUtils; import org.lwjgl.input.Mouse; /** * A page is a 1056x728 rectangle of the GUI. It is the main content of the gui, and can be switched back and forwards easily. All the content of OneConfig is in a page. */ public abstract class Page { + protected final String title; private Animation scrollAnimation; private float scrollTarget; - protected final String title; - protected Page(String title) { this.title = title; } -- cgit