Skip to content

Rename Interaction::Click #8989

@Shatur

Description

@Shatur

What problem does this solve or what need does it fill?

When I saw this variant, I thought that it works like in usual in UI - if I press and release the RMB over the button, then it is considered as "clicked". Also all examples check Interaction::Click for button pressing.
But it's not how it works! Interaction::Click just represents the pressed state of a button.

What solution would you like?

Rename Interaction::Click into Interaction::Pressed. This will by much clear. No functional changes.

Additional context

I think Interaction represents the state of the button and it's handy for changing the appearance.
But to check for clicking, I would add additional mechanism and I think it should be an event, not a state (an RMB press and then release over the button).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-InputPlayer input via keyboard, mouse, gamepad, and moreA-UIGraphical user interfaces, styles, layouts, and widgetsC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions