aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-28 00:49:28 -0500
committerGitHub <noreply@github.com>2021-12-28 16:49:28 +1100
commitea3ec354ba3bb5b4ac64b8032816b8e4c407f099 (patch)
tree2a1b35a90a5b2e430ed8b09cfb0c6c8e28166039 /src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java
parent0aa264dd9df3205cf9641f052b6622fd36b811d5 (diff)
downloadnotenoughupdates-ea3ec354ba3bb5b4ac64b8032816b8e4c407f099.tar.gz
notenoughupdates-ea3ec354ba3bb5b4ac64b8032816b8e4c407f099.tar.bz2
notenoughupdates-ea3ec354ba3bb5b4ac64b8032816b8e4c407f099.zip
more code clean up (#38)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java
index d1df10c8..fda6dd03 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java
@@ -32,7 +32,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class TradeWindow {
-
private static final ResourceLocation location = new ResourceLocation("notenoughupdates", "custom_trade.png");
private static final int xSize = 176;
@@ -870,19 +869,22 @@ public class TradeWindow {
if (mouseX >= guiLeft + xSize + 3 && mouseX <= guiLeft + xSize + 3 + 17) {
if (mouseY >= guiTop + ySize - 19 && mouseY <= guiTop + ySize - 19 + 17) {
- tooltipToDisplay = new ArrayList<>();
- tooltipToDisplay.add(EnumChatFormatting.GOLD + "Enable Custom Trade Menu");
- tooltipToDisplay.add(EnumChatFormatting.GRAY + "Use this menu instead of the default trade window");
+ tooltipToDisplay = new ArrayList<String>() {{
+ add(EnumChatFormatting.GOLD + "Enable Custom Trade Menu");
+ add(EnumChatFormatting.GRAY + "Use this menu instead of the default trade window");
+ }};
tooltipLen = 200;
} else if (mouseY >= guiTop + ySize - 38 && mouseY <= guiTop + ySize - 38 + 17) {
- tooltipToDisplay = new ArrayList<>();
- tooltipToDisplay.add(EnumChatFormatting.GOLD + "Price Information");
- tooltipToDisplay.add(EnumChatFormatting.GRAY + "Show the price of items on both sides");
+ tooltipToDisplay = new ArrayList<String>() {{
+ add(EnumChatFormatting.GOLD + "Price Information");
+ add(EnumChatFormatting.GRAY + "Show the price of items on both sides");
+ }};
tooltipLen = 200;
} else if (mouseY >= guiTop + ySize - 57 && mouseY <= guiTop + ySize - 57 + 17) {
- tooltipToDisplay = new ArrayList<>();
- tooltipToDisplay.add(EnumChatFormatting.GOLD + "Trade Prices Style");
- tooltipToDisplay.add(EnumChatFormatting.GRAY + "Changes the style of the top item prices");
+ tooltipToDisplay = new ArrayList<String>() {{
+ add(EnumChatFormatting.GOLD + "Trade Prices Style");
+ add(EnumChatFormatting.GRAY + "Changes the style of the top item prices");
+ }};
tooltipLen = 200;
}
}
@@ -1039,5 +1041,4 @@ public class TradeWindow {
return Keyboard.getEventKey() != Keyboard.KEY_ESCAPE;
}
-
}