diff options
| author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-06-05 15:27:36 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-05 10:27:36 +0200 |
| commit | 44dfbbb419f1736530c04c02a651f7757cf83f3d (patch) | |
| tree | 1e8171573680b9415cecf199d479d49f7ad1f48a /src/main/java/cc/polyfrost/oneconfig/gui/pages | |
| parent | 494d4f0bd0856e8e8d373003c82729ca722c6ccf (diff) | |
| download | OneConfig-44dfbbb419f1736530c04c02a651f7757cf83f3d.tar.gz OneConfig-44dfbbb419f1736530c04c02a651f7757cf83f3d.tar.bz2 OneConfig-44dfbbb419f1736530c04c02a651f7757cf83f3d.zip | |
rewrite command manager, stop using essential relocate, and reformat code (#34)
* reformat code
* reformat code
rewrite command manager
stop using essential relocate
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/pages')
| -rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java | 4 | ||||
| -rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/pages/Page.java | 5 |
2 files changed, 3 insertions, 6 deletions
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; } |
