-
Notifications
You must be signed in to change notification settings - Fork 64
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
BackgroundColor support #97
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for the change!
I'm generally against adding more lenses, as really the system is designed for users to write their own, and I don't want to have to maintain every single use case. That being said, here I appreciate how common this is, and is in a sense an unfortunate regression of Bevy newtyping all its UI type a few releases ago. So OK for this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please update the CHANGELOG, and ideally add a small test for that new lens? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need CHANGELOG update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the CHANGELOG change myself just to complete the PR as we're nearing the Bevy 0.12 release and I want to be ready :) Thanks!
I's pretty common to need the ability to fade UI elements/images on and off, so I added a lens for BackgroundColor.
Simply tween the alpha value for two Color::rgb().set_a()
It's very nice for flashing something on screen and removing after a delay, like a killfeed notification.
This would also work for going between any 2 colors, but I think the opacity will be most used.