Skip to content

Example free_camera_controller UI text is rendering incorrectly. #22955

@Breakdown-Dog

Description

@Breakdown-Dog

Bevy version and features

  • main branch

What you did

Run example free_camera_controller

What went wrong

There are boxes in the top-left corner here.
Image

I believe this is caused by the \t character not rendering properly here. However, I’m not very familiar with this area, so I’m not sure how to fix this bug elegantly.

impl fmt::Display for FreeCamera {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(
            f,
            "
Freecamera Controls:
    Mouse\t- Move camera orientation
    Scroll\t- Adjust movement speed
    {:?}\t- Hold to grab cursor
    {:?}\t- Toggle cursor grab
    {:?} & {:?}\t- Fly forward & backwards
    {:?} & {:?}\t- Fly sideways left & right
    {:?} & {:?}\t- Fly up & down
    {:?}\t- Fly faster while held",
            self.mouse_key_cursor_grab,
            self.keyboard_key_toggle_cursor_grab,
            self.key_forward,
            self.key_back,
            self.key_left,
            self.key_right,
            self.key_up,
            self.key_down,
            self.key_run,
        )
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-TextRendering and layout for charactersC-BugAn unexpected or incorrect behaviorS-Needs-InvestigationThis issue requires detective work to figure out what's going wrong

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions