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

Compatibility with bevy ui #15

Closed
Inky-developer opened this issue Nov 18, 2020 · 3 comments
Closed

Compatibility with bevy ui #15

Inky-developer opened this issue Nov 18, 2020 · 3 comments

Comments

@Inky-developer
Copy link

If I am not mistaken, it is currently not possible to combine this crates functionality with bevy ui components.
It seems like NodeComponents always renders in front of a primitive. It is also not possible to add a primitive as a child to a NodeComponent.

@Nilirad
Copy link
Owner

Nilirad commented Nov 22, 2020

Yes, you're right. I'm using the SpriteComponents bundle to create the shapes. The UI, if I'm correct, is rendered using the UiCamera, while the sprites with the 2D camera. I think the best way to achieve that is waiting for bevyengine/bevy#90

@dcz-self
Copy link

I managed to get this in the UI: https://github.com/dcz-self/breedmatic/blob/54c75ec0fed0eb958aec7c9459e9ad25f3f9eebb/src/viewer.rs#L116

XY positioning works, but z-order gave me trouble. I don't know how that works, but it seems all I could do is change the order of drawing.

@Nilirad
Copy link
Owner

Nilirad commented Sep 21, 2021

Fixed by #114.


NOTICE (2023-06-20)

Unfortunately, Bevy's development took a direction that made it difficult to maintain UI shapes. Therefore, this feature was removed briefly after implementation. If you are interested in bringing this feature back, you're welcome to submit a PR.

@Nilirad Nilirad closed this as completed Sep 21, 2021
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

3 participants