Skip to content

Confusing duplicate named Button components #21542

@robojeb

Description

@robojeb

Bevy version and features

Bevy 0.17.2 default features + "experimental_bevy_feathers"

What you did

I was attempting to create a variant of feathers::components::button() that was specialized for a vertical layout for tab switching. Specifically I wanted to remove the flex_grow so that buttons always remained the same height.

I copied the contents of the feathers::components::button() function and made my desired modifications.

What went wrong

With this modification I did not receive any Activate events.

This is because the prelude includes bevy_ui::widgets::Button but to get a feathers style button working you need bevy_ui_widgets::Button.
Through the standard import scheme these are only differentable by the location of a colon pair:

use bevy::ui::widgets::Button;
use bevy::ui_widgets::Button;

This is highly unintuitive and renaming or removing should probably be the focus of future UI changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UIGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedX-UncontroversialThis work is generally agreed upon

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions