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

Icons on FlxUIButtons are stamped on top of each other #200

Open
happinesssam opened this issue Oct 13, 2016 · 0 comments
Open

Icons on FlxUIButtons are stamped on top of each other #200

happinesssam opened this issue Oct 13, 2016 · 0 comments

Comments

@happinesssam
Copy link

I recently updated from 1.0.2 to 2.2.0.
I've been creating some FlxUIButtons dynamically and previously I was stamping them from another FlxSprite that has all the frames. On updating it seemed that the icons were all getting stamped on top of each other.

After scratching my head and looking into it I found what I think is the issue - on line 192 of FlxUIButton it loads the new graphic, but the new bitmap isn't unique and the keys will be the same since the buttons and icon all share the same assets. When I amended it so that the new bitmap was unique the issue was resolved and the icons displayed correctly. I am not sure if there would be any problems down the line from doing this.

In summary, currently line 192 of FlxUIButton is
loadGraphic(newGraphic, true, Std.int(width), Std.int(height));
and my icons look like this:
image

If I amend that line to
loadGraphic(newGraphic, true, Std.int(width), Std.int(height), true);
my icons look like this:
image

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

No branches or pull requests

1 participant