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

no click detection #8524

Open
nablabla opened this issue May 1, 2023 · 1 comment
Open

no click detection #8524

nablabla opened this issue May 1, 2023 · 1 comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A simple quality-of-life change that makes Bevy easier to use

Comments

@nablabla
Copy link

nablabla commented May 1, 2023

There is only Clicked in this enum (focus.rs)

pub enum Interaction {
    /// The node has been clicked
    Clicked,
    /// The node has been hovered over
    Hovered,
    /// Nothing has happened
    None,
}

Any query with that is called in every frame. I want an event that is only called exactly once in the first frame when the btton is clicked firstly. Otherwise I have to add bookkeeping about the mouse state

@nablabla nablabla added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels May 1, 2023
@alice-i-cecile alice-i-cecile added A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A simple quality-of-life change that makes Bevy easier to use A-Input Player input via keyboard, mouse, gamepad, and more and removed S-Needs-Triage This issue needs to be labelled C-Bug An unexpected or incorrect behavior labels May 4, 2023
@nicoburns
Copy link
Contributor

You may wish to check out https://github.com/aevyrie/bevy_mod_picking. Work had just started on upstreaming this into bevy itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A simple quality-of-life change that makes Bevy easier to use
Projects
None yet
Development

No branches or pull requests

3 participants