Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FlxNestedSprite drawing default png by default #415

Merged
merged 2 commits into from
Dec 22, 2023

Conversation

itulau
Copy link
Contributor

@itulau itulau commented Dec 22, 2023

FlxNestedSprite shows the Flixel default icon when there isn't an image nor graphic loaded which seems to be the default behavior of draw() inherited from FlxSprite. So every FlxNestedSprite that itself doesn't render anything but contains children will have a default icon shown by default.

This PR adresses this problem by guarding the call for drawing of the current FlxNestedSprite with a null check for _frame (the same variable that's used when checking for null when adding the default icon).

Solves #413

itulau and others added 2 commits December 19, 2023 22:27
By adding a check for existence on _frame (which FlxSprite uses to insert the default png)
when drawing the element this prevents the default behavior.
@Geokureli Geokureli merged commit 19c2816 into HaxeFlixel:dev Dec 22, 2023
15 checks passed
@Geokureli
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants