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/elements/BasicElement.java | |
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/elements/BasicElement.java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java index 0e3fe23..aab94e5 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java @@ -8,6 +8,8 @@ import org.jetbrains.annotations.NotNull; import org.lwjgl.input.Mouse; public class BasicElement { + protected final float radius; + public int currentColor; protected int width, height; protected ColorPalette colorPalette; protected int hitBoxX, hitBoxY; @@ -17,10 +19,8 @@ public class BasicElement { protected boolean clicked = false; protected boolean toggled = false; protected boolean disabled = false; - public int currentColor; - protected final float radius; - private boolean block = false; protected ColorAnimation colorAnimation; + private boolean block = false; public BasicElement(int width, int height, @NotNull ColorPalette colorPalette, boolean hoverFx) { this(width, height, colorPalette, hoverFx, 12f); @@ -79,14 +79,6 @@ public class BasicElement { hitBoxY = y; } - public void setWidth(int width) { - this.width = width; - } - - public void setHeight(int height) { - this.height = height; - } - public void setColorPalette(ColorPalette colorPalette) { if (this.colorPalette.equals(ColorPalette.TERTIARY) || this.colorPalette.equals(ColorPalette.TERTIARY_DESTRUCTIVE)) this.colorAnimation.setColors(colorPalette.getNormalColorf()); @@ -98,10 +90,18 @@ public class BasicElement { return width; } + public void setWidth(int width) { + this.width = width; + } + public int getHeight() { return height; } + public void setHeight(int height) { + this.height = height; + } + public boolean isHovered() { return hovered; } |