diff options
author | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-07-21 13:30:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-21 14:30:05 +0200 |
commit | ead404e7e2c54a36f0dddbf87ab26a5342851f0f (patch) | |
tree | 800f243755b797bed28e8d8bc4bb0ddd30809c81 /src/main/java/cc/polyfrost/oneconfig/gui | |
parent | 6fd6138f40f5ae1d0f924a7de382d889e277ee59 (diff) | |
download | OneConfig-ead404e7e2c54a36f0dddbf87ab26a5342851f0f.tar.gz OneConfig-ead404e7e2c54a36f0dddbf87ab26a5342851f0f.tar.bz2 OneConfig-ead404e7e2c54a36f0dddbf87ab26a5342851f0f.zip |
a couple fixes (#63)
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java | 1 | ||||
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigColorElement.java | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java index 1691eca..afe899d 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java @@ -115,6 +115,7 @@ public class BasicButton extends BasicElement { @Override public void onClick() { + if(disabled) return; if (this.page != null && OneConfigGui.INSTANCE != null) { OneConfigGui.INSTANCE.openPage(page); } else if (this.runnable != null) { diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigColorElement.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigColorElement.java index 16796e9..a3b45bf 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigColorElement.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigColorElement.java @@ -37,6 +37,7 @@ public class ConfigColorElement extends BasicOption { @Override public void draw(long vg, int x, int y) { + if(OneConfigGui.INSTANCE == null) return; if (!isEnabled()) RenderManager.setAlpha(vg, 0.5f); hexField.disable(!isEnabled()); alphaField.disable(!isEnabled() || !allowAlpha); |