diff options
author | DoKM <mcazzyman@gmail.com> | 2021-08-01 17:42:32 +0200 |
---|---|---|
committer | DoKM <mcazzyman@gmail.com> | 2021-08-01 17:42:32 +0200 |
commit | f9a9854ce9f60e8bedf02c7eb9810c3b0f2798ec (patch) | |
tree | 2d3edb8b08f375ab0ff1c5680d2952cdc4197309 /src/main/java/io | |
parent | 58aece3b67b0acca9466a83f53574489391de0ed (diff) | |
download | NotEnoughUpdates-f9a9854ce9f60e8bedf02c7eb9810c3b0f2798ec.tar.gz NotEnoughUpdates-f9a9854ce9f60e8bedf02c7eb9810c3b0f2798ec.tar.bz2 NotEnoughUpdates-f9a9854ce9f60e8bedf02c7eb9810c3b0f2798ec.zip |
Add option to only show tooltips when holding keybind
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java | 4 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java index 9c2c1ef9..1bca2a84 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java @@ -2,6 +2,7 @@ package io.github.moulberry.notenoughupdates; import com.google.gson.JsonObject; import io.github.moulberry.notenoughupdates.auction.APIManager; +import io.github.moulberry.notenoughupdates.core.config.KeybindHelper; import io.github.moulberry.notenoughupdates.util.Constants; import io.github.moulberry.notenoughupdates.util.Utils; import net.minecraft.item.ItemStack; @@ -23,6 +24,9 @@ public class ItemPriceInformation { if(stack.getTagCompound().hasKey("disableNeuTooltip") && stack.getTagCompound().getBoolean("disableNeuTooltip")){ return false; } + if(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.disablePriceKey && !KeybindHelper.isKeyDown(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.disablePriceKeyKeybind)){ + return false; + } JsonObject auctionInfo = NotEnoughUpdates.INSTANCE.manager.auctionManager.getItemAuctionInfo(internalname); JsonObject bazaarInfo = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo(internalname); float lowestBinAvg = NotEnoughUpdates.INSTANCE.manager.auctionManager.getItemAvgBin(internalname); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java index b7fb3433..71508144 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java @@ -2,6 +2,7 @@ package io.github.moulberry.notenoughupdates.options.seperateSections; import com.google.gson.annotations.Expose;
import io.github.moulberry.notenoughupdates.core.config.annotations.*;
+import org.lwjgl.input.Keyboard;
import java.util.ArrayList;
import java.util.Arrays;
@@ -62,6 +63,24 @@ public class TooltipTweaks { @Expose
@ConfigOption(
+ name = "Price info keybind",
+ desc = "Only show price info if holding a key."
+ )
+ @ConfigEditorBoolean
+ public boolean disablePriceKey = false;
+
+ @Expose
+ @ConfigOption(
+ name = "Show Price info Keybind",
+ desc = "Hold this key to show a price info tooltip"
+ )
+ @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE)
+ public int disablePriceKeyKeybind = Keyboard.KEY_NONE;
+
+
+
+ @Expose
+ @ConfigOption(
name = "Show reforge stats",
desc = "Show statistics a reforge stone will apply."
)
|