aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/CustomWardrobeConfig.java12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt9
2 files changed, 20 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/CustomWardrobeConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/CustomWardrobeConfig.java
index a4ea69bad..fd2a94793 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/CustomWardrobeConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/CustomWardrobeConfig.java
@@ -4,7 +4,9 @@ import at.hannibal2.skyhanni.config.FeatureToggle;
import com.google.gson.annotations.Expose;
import io.github.notenoughupdates.moulconfig.annotations.Accordion;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorKeybind;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
+import org.lwjgl.input.Keyboard;
public class CustomWardrobeConfig {
@@ -43,6 +45,16 @@ public class CustomWardrobeConfig {
public boolean loadingText = true;
@Expose
+ @ConfigOption(name = "Armor Tooltip Keybind", desc = "Only show the lore of the item hovered when holding a keybind.")
+ @ConfigEditorBoolean
+ public boolean showTooltipOnlyKeybind = false;
+
+ @Expose
+ @ConfigOption(name = "Tooltip Keybind", desc = "Press this key to show the item tooltip.")
+ @ConfigEditorKeybind(defaultKey = Keyboard.KEY_LSHIFT)
+ public int tooltipKeybind = Keyboard.KEY_LSHIFT;
+
+ @Expose
@ConfigOption(name = "Colors", desc = "Change the color settings.")
@Accordion
public ColorConfig color = new ColorConfig();
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt
index 69df1cf56..ff9a7610a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt
@@ -26,6 +26,7 @@ import at.hannibal2.skyhanni.utils.DelayedRun
import at.hannibal2.skyhanni.utils.EntityUtils.getFakePlayer
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.removeEnchants
+import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyHeld
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RenderUtils.HorizontalAlignment
import at.hannibal2.skyhanni.utils.RenderUtils.VerticalAlignment
@@ -207,7 +208,13 @@ object CustomWardrobe {
if (stack != null) {
val toolTip = getToolTip(stack, slot, armorIndex)
if (toolTip != null) {
- renderable = Renderable.hoverTips(renderable, tips = toolTip)
+ renderable = Renderable.hoverTips(
+ renderable,
+ tips = toolTip,
+ condition = {
+ !config.showTooltipOnlyKeybind || config.tooltipKeybind.isKeyHeld()
+ },
+ )
}
}
loreList.add(renderable)