Skip to content

Add Input::reset_all #3383

@alice-i-cecile

Description

@alice-i-cecile

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

Sometimes, all of the inputs of a given type need to be reset at once.

What solution would you like?

Add a Input::reset_all method.

What alternative(s) have you considered?

Manually set the Input<T> resource to its default value.

E.g.

*keyboard_input = Input::<KeyCode>::default();

Additional context

Used in a workaround for #1700, as documented in https://bevy-cheatbook.github.io/programming/states.html#with-input

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-InputPlayer input via keyboard, mouse, gamepad, and moreC-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with Bevy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions