NichtStudioCode / InvUI

A spigot library for creating custom inventory-based GUIs.
MIT License
242 stars 19 forks source link

OutsideClickHandler not working #86

Closed Nononitas closed 1 month ago

Nononitas commented 1 month ago

OutsideClickHandler are never getting fired. I registered one like this: grafik

The Consumer with the event however only gets fired when click not on any Inventory Slot. Shouldn't be the behaivour in this way that you can register a global click handler, for the window?

NichtStudioCode commented 1 month ago

The outside click handlers are only called when clicking outside the inventory. All other clicks are handled by the clicked slot element (item / virtual inventory)

Nononitas commented 1 month ago

How can you handle clicks outside of the window then? I want to be able to interact with the lower Inventory, without filling it?

NichtStudioCode commented 1 month ago

There's currently no way to listen to clicks on slots that aren't actually part of the Window, but you can just listen to the InventoryClickEvent and get the currently open window using WindowManager.