fix: Closing storage overlay when searching for "e"

This commit is contained in:
Linnea Gräf
2025-01-12 14:36:06 +01:00
parent 29bdb00b7f
commit 4562d294bb
2 changed files with 13 additions and 1 deletions

View File

@@ -302,6 +302,7 @@ class StorageOverlayScreen : Screen(Text.literal("")) {
}
fun mouseClicked(mouseX: Double, mouseY: Double, button: Int, activePage: StoragePageSlot?): Boolean {
guiContext.setFocusedElement(null) // Blur all elements. They will be refocused by clickMCComponentInPlace if in doubt, and we don't have any double click components.
if (getScrollPanelInner().contains(mouseX, mouseY)) {
val data = StorageOverlay.Data.data ?: StorageData()
layoutedForEach(data) { rect, page, _ ->