haxeui / haxeui-flixel

The Flixel backend of the HaxeUI framework
MIT License
48 stars 15 forks source link

Fix child components being added to `Screen.instance.rootComponents` #37

Closed Starmapo closed 8 months ago

Starmapo commented 8 months ago

Basically after FlxG.signals.postStateSwitch was dispatched, the checkMembers function would loop through already-added components and add their children to rootComponents. This resulted in a more noticeable bug where components wouldn't lose their focus after you click on empty space, since topComponent would return one that wasn't actually on top.

Before:

https://github.com/haxeui/haxeui-flixel/assets/85134252/0eb81ea4-829d-479b-98d1-9194912a826d

After:

https://github.com/haxeui/haxeui-flixel/assets/85134252/aa867fe2-738f-4b27-aa12-2eb326f62258