Skip to content

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

Open

Description

@ickshonpe

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.

Activity

  1. added
    C-BugAn unexpected or incorrect behavior
    S-Needs-TriageThis issue needs to be labelled
    on Dec 3, 2022
  2. changed the title [-]UiNodes with both Text and Image components[/-] [+]Conflict between Text and UiImage components when a ui node has both[/+] on Dec 3, 2022
  3. tim-blackbird commented on Dec 3, 2022

    @tim-blackbird
    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

  4. added
    A-UIGraphical user interfaces, styles, layouts, and widgets
    and removed
    S-Needs-TriageThis issue needs to be labelled
    on Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UIGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions