wisp-forest / owo-lib

Open ωorthωhile Operations, yes the acronym was "totally accidental"
https://modrinth.com/mod/owo-lib
MIT License
191 stars 37 forks source link

Mouse enter event not being emitted on root component fix #233

Open Stuff-Stuffs opened 5 months ago

Stuff-Stuffs commented 5 months ago

This fixes the mouse enter event not being emitted for root components or when using the Layer api. This is caused by the check to bypass the event if the component has no root component(ie current component is the root). The fix is just to only bypass the event if there is a root. However to keep the behavior of checking if a child should receive the event instead I also had to override updateHoveredState in BaseParentComponent to add the case that the current component might be the root and have children.