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

Make bevy_window and bevy_input events serializable #6021

Closed
alice-i-cecile opened this issue Sep 19, 2022 · 4 comments
Closed

Make bevy_window and bevy_input events serializable #6021

alice-i-cecile opened this issue Sep 19, 2022 · 4 comments
Labels
A-Input Player input via keyboard, mouse, gamepad, and more A-Windowing Platform-agnostic interface layer to run your app in C-Testing A change that impacts how we test Bevy or how users test their apps C-Usability A simple quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@alice-i-cecile
Copy link
Member

alice-i-cecile commented Sep 19, 2022

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

All of the events in this file should be serializable, in order to enable effective playback of window events for testing.

Similarly, many events in bevy_input are not serializable.

What solution would you like?

Add derives for Serialize and Deserialize, controlled by an off-by-default feature flag.

@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy A-Windowing Platform-agnostic interface layer to run your app in C-Usability A simple quality-of-life change that makes Bevy easier to use C-Testing A change that impacts how we test Bevy or how users test their apps labels Sep 19, 2022
@alice-i-cecile alice-i-cecile changed the title Make bevy_window events serializable Make bevy_window and bevy_input events serializable Sep 19, 2022
@alice-i-cecile alice-i-cecile added the A-Input Player input via keyboard, mouse, gamepad, and more label Sep 19, 2022
@emersonmx
Copy link
Contributor

Hello.
I started to see this issue, but I can't tell what should be serialized or not in bevy_input.
I found this too, but I don't know if I need to put it in all struct of touch.rs or if only in those that are commented out as an event. Example: A touch input event.

@alice-i-cecile
Copy link
Member Author

Hmm, good question. WRT touch data, it's hard to say, as I haven't experimented with Bevy on touch devices yet. For my purposes, I think TouchInput is the only critical one.

@bors bors bot closed this as completed in 087f1c6 Oct 6, 2022
@alice-i-cecile alice-i-cecile reopened this Oct 6, 2022
@alice-i-cecile
Copy link
Member Author

Reopening so we can tackle touch input events too.

@emersonmx
Copy link
Contributor

Hello again 👋🏻
The only places I could find to put "serialize" were TouchInput and ForceTouch.

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-Windowing Platform-agnostic interface layer to run your app in C-Testing A change that impacts how we test Bevy or how users test their apps C-Usability A simple quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
2 participants