aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt
index 463eb33..c7ca6e4 100644
--- a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt
+++ b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt
@@ -533,7 +533,11 @@ class StorageOverlayScreen : Screen(Text.literal("")) {
context.drawItem(stack, slotX, slotY)
context.drawStackOverlay(textRenderer, stack, slotX, slotY)
SlotRenderEvents.After.publish(SlotRenderEvents.After(context, fakeSlot))
- if (StorageOverlay.TConfig.showInactivePageTooltips && !stack.isEmpty && mouseX >= slotX && mouseY >= slotY && mouseX <= slotX + 16 && mouseY <= slotY + 16) {
+ val rect = getScrollPanelInner()
+ if (StorageOverlay.TConfig.showInactivePageTooltips && !stack.isEmpty &&
+ mouseX >= slotX && mouseY >= slotY &&
+ mouseX <= slotX + 16 && mouseY <= slotY + 16 &&
+ mouseY >= rect.minY && mouseY <= rect.maxY) {
try {
context.drawItemTooltip(textRenderer, stack, mouseX, mouseY)
} catch (e: IllegalStateException) {