From c0eee7a5df9239a361d5e6363a172abe32fd0e84 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:31:02 +1000 Subject: added a setting to toggle hex separate from /et (#275) --- .../notenoughupdates/listener/ItemTooltipListener.java | 6 +----- .../moulberry/notenoughupdates/miscgui/hex/GuiCustomHex.java | 4 ++-- .../notenoughupdates/options/seperateSections/Enchanting.java | 11 ++++++++++- 3 files changed, 13 insertions(+), 8 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/ItemTooltipListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/ItemTooltipListener.java index 1cd71eb6..5d6a2bdc 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/listener/ItemTooltipListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/ItemTooltipListener.java @@ -836,15 +836,11 @@ public class ItemTooltipListener { boolean m = Keyboard.isKeyDown(Keyboard.KEY_M); boolean n = Keyboard.isKeyDown(Keyboard.KEY_N); boolean f = Keyboard.isKeyDown(Keyboard.KEY_F); - boolean l = Keyboard.isKeyDown(Keyboard.KEY_L); if (!copied && f && NotEnoughUpdates.INSTANCE.config.hidden.dev) { MiscUtils.copyToClipboard(NotEnoughUpdates.INSTANCE.manager.getSkullValueForItem(event.itemStack)); } - if (!copied && l) { - NotEnoughUpdates.INSTANCE.config.enchantingSolvers.enableTableGUI = !NotEnoughUpdates.INSTANCE.config.enchantingSolvers.enableTableGUI; - } event.toolTip.add( EnumChatFormatting.AQUA + "Internal Name: " + EnumChatFormatting.GRAY + internal + EnumChatFormatting.GOLD + @@ -883,7 +879,7 @@ public class ItemTooltipListener { } } - copied = k || m || n || f || l; + copied = k || m || n || f; } } } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/hex/GuiCustomHex.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/hex/GuiCustomHex.java index 39374f9d..c59a7003 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/hex/GuiCustomHex.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/hex/GuiCustomHex.java @@ -243,7 +243,7 @@ public class GuiCustomHex extends Gui { searchField.setText(""); return false; } - boolean config = NotEnoughUpdates.INSTANCE.config.enchantingSolvers.enableTableGUI; + boolean config = NotEnoughUpdates.INSTANCE.config.enchantingSolvers.enableHexGUI; final List gemList = new ArrayList<>(Arrays.asList( "\u2764", "\u2748", @@ -4334,7 +4334,7 @@ public class GuiCustomHex extends Gui { switch (index) { case 0: { - NotEnoughUpdates.INSTANCE.config.enchantingSolvers.enableTableGUI = false; + NotEnoughUpdates.INSTANCE.config.enchantingSolvers.enableHexGUI = false; break; } case 2: { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java index 2f3ffa36..306629f7 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java @@ -28,7 +28,7 @@ import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigOption public class Enchanting { @ConfigOption( - name = "Enchant Table GUI", + name = "Enchant Table / Hex GUI", desc = "" ) @ConfigEditorAccordion(id = 1) @@ -43,6 +43,15 @@ public class Enchanting { @ConfigAccordionId(id = 1) public boolean enableTableGUI = true; + @Expose + @ConfigOption( + name = "Enable Hex GUI", + desc = "Show a custom GUI when using the Hex" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 1) + public boolean enableHexGUI = true; + /*@Expose @ConfigOption( name = "Incompatible Enchants", -- cgit