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

Conflict between Text and UiImage components when a ui node has both #6835

Open
ickshonpe opened this issue Dec 3, 2022 · 1 comment
Open
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior

Comments

@ickshonpe
Copy link
Contributor

ickshonpe commented Dec 3, 2022

Bevy version

Bevy 0.9

What went wrong

If you add both the image and text components to a UI node you get a mess:

Capture_text_images

Until archetype invariants can be enforced (#5121), users can't be prevented from adding both components.

It's natural for a user who wants to add a caption to an image to naively add text components to an ImageBundle and sometimes it will work.

What solution would you like?

I think only drawing the text, and emitting a warning explaining why the image isn't shown is probably the best that can be done for now.

@ickshonpe ickshonpe added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Dec 3, 2022
@ickshonpe ickshonpe changed the title UiNodes with both Text and Image components Conflict between Text and UiImage components when a ui node has both Dec 3, 2022
@tim-blackbird
Copy link
Contributor

A node can't be both text and an image at the same time, but we can't prevent someone from adding both components without #5121

@james7132 james7132 added A-UI Graphical user interfaces, styles, layouts, and widgets and removed S-Needs-Triage This issue needs to be labelled labels Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

No branches or pull requests

3 participants