Skip to content

Commit

Permalink
Merge pull request #13 from SergioRibera/improve_serde
Browse files Browse the repository at this point in the history
Rename serialize feature by serde
  • Loading branch information
SergioRibera authored Nov 3, 2023
2 parents b3bca7a + 4f06a6c commit c9955ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ name = "multiple"
required-features = ["inspect"]

[features]
default = ["serialize"]
default = ["serde"]
inspect = ["bevy-inspector-egui"]
serialize = ["serde"]
serde = ["dep:serde"]

[dependencies]
bevy = { version = "0.11", default-features = false, features = [
Expand All @@ -34,4 +34,4 @@ bevy-inspector-egui = { version = "0.19", optional = true }
serde = { version = "^1", features = ["derive"], optional = true }

[dev-dependencies]
bevy = "0.11"
bevy = "0.11"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ Aviable and compatible versions

# Features
- inspect: for world inspect with egui inspector
- serialize (default): for serialization support for all types (usable for save and load settings)
- [`serde`](https://serde.rs) (default): for serialization support for all types (usable for save and load settings)

```toml
virtual_joystick = {
version = "*",
default-features = false,
features = [ "inspect", "serialize" ]
features = [ "inspect", "serde" ]
}
```

Expand All @@ -66,7 +66,7 @@ cargo run --example simple -F=inspect
Add to Cargo.toml
```toml
[dependencies]
bevy = "0.10.1"
bevy = "0.11"
virtual_joystick = "*" # Add your version
```

Expand Down
6 changes: 3 additions & 3 deletions src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ use bevy::prelude::*;

#[cfg(feature = "inspect")]
use bevy_inspector_egui::prelude::*;
#[cfg(feature = "serialize")]
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

#[derive(Reflect, Clone, Copy, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "inspect", derive(InspectorOptions))]
#[cfg_attr(feature = "serialize", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "inspect", reflect(InspectorOptions))]
pub enum VirtualJoystickAxis {
#[default]
Expand Down Expand Up @@ -40,7 +40,7 @@ impl VirtualJoystickAxis {

#[derive(Reflect, Clone, Copy, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "inspect", derive(InspectorOptions))]
#[cfg_attr(feature = "serialize", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "inspect", reflect(InspectorOptions))]
pub enum VirtualJoystickType {
/// Static position
Expand Down

0 comments on commit c9955ad

Please sign in to comment.