aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementButton.java
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-16 15:50:41 -0400
committerGitHub <noreply@github.com>2021-10-16 15:50:41 -0400
commit7c00af18febf6c0b833c7633b4fb60a9a1bb93af (patch)
treef02de145362d6a1399651ade4a130d565d7f0ba3 /src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementButton.java
parentb11742988dec635b5c5da7c2363803cbfafb37b1 (diff)
downloadnotenoughupdates-7c00af18febf6c0b833c7633b4fb60a9a1bb93af.tar.gz
notenoughupdates-7c00af18febf6c0b833c7633b4fb60a9a1bb93af.tar.bz2
notenoughupdates-7c00af18febf6c0b833c7633b4fb60a9a1bb93af.zip
Code Clean Up (#2)
* intellij code clean up * optimize imports * format * intellij suggestions * fix empty catch issues
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementButton.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementButton.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementButton.java b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementButton.java
index 0ed03c36..017b61c9 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementButton.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementButton.java
@@ -4,7 +4,7 @@ import java.awt.*;
public class GuiElementButton extends GuiElementText {
- private Runnable callback;
+ private final Runnable callback;
public GuiElementButton(String text, int colour, Runnable callback) {
super(text, colour);
@@ -28,8 +28,8 @@ public class GuiElementButton extends GuiElementText {
@Override
public void render(int x, int y) {
- drawRect(x, y, x+getWidth(), y+super.getHeight(), Color.WHITE.getRGB());
- drawRect(x+1, y+1, x+getWidth()-1, y+super.getHeight()-1, Color.BLACK.getRGB());
- super.render(x+5, y-1);
+ drawRect(x, y, x + getWidth(), y + super.getHeight(), Color.WHITE.getRGB());
+ drawRect(x + 1, y + 1, x + getWidth() - 1, y + super.getHeight() - 1, Color.BLACK.getRGB());
+ super.render(x + 5, y - 1);
}
}