From d8c28bcacd6782b3e597bed7385fd81ae04aee4b Mon Sep 17 00:00:00 2001 From: Federico Rinaldi Date: Wed, 13 Nov 2024 15:35:57 +0100 Subject: [PATCH] Update v0.13.0 rc.2 (#262) * Update package version and dependencies * Fix clippy lints * Update `CHANGELOG.md` --- CHANGELOG.md | 5 +++-- Cargo.toml | 6 +++--- src/shapes.rs | 7 ++++++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33700b6..fa00c19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # Changelog -## 0.13.0-rc.1 -- Support for Bevy 0.15.0-rc.2. +## 0.13.0-rc.2 +- Support for Bevy 0.15.0-rc.3. +- `Rectangle` now supports border radii (see `rectangle.rs` example). - Removed deprecated `SpatialBundle` from `ShapeBundle`: `Transform` and `Visibility` are now added separately. ## 0.12.0 diff --git a/Cargo.toml b/Cargo.toml index 41f6139..9cf9010 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,12 +8,12 @@ license = "MIT OR Apache-2.0" name = "bevy_prototype_lyon" readme = "README.md" repository = "https://github.com/Nilirad/bevy_prototype_lyon/" -version = "0.13.0-rc.1" +version = "0.13.0-rc.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bevy = { version = "0.15.0-rc.2", default-features = false, features = [ +bevy = { version = "0.15.0-rc.3", default-features = false, features = [ "bevy_sprite", "bevy_render", "bevy_core_pipeline", @@ -24,7 +24,7 @@ lyon_algorithms = "1" svgtypes = "0.15" [dev-dependencies] -bevy = { version = "0.15.0-rc.2", default-features = false, features = [ +bevy = { version = "0.15.0-rc.3", default-features = false, features = [ "x11", "bevy_asset", ] } diff --git a/src/shapes.rs b/src/shapes.rs index e94be9b..3976cad 100644 --- a/src/shapes.rs +++ b/src/shapes.rs @@ -55,6 +55,7 @@ pub struct BorderRadii { impl BorderRadii { /// Use a single radius for all corners. + #[must_use] pub fn single(radius: f32) -> Self { Self { top_left: radius, @@ -65,6 +66,7 @@ impl BorderRadii { } /// Use a single radius for the top corners and zero for the bottom corners. + #[must_use] pub fn top(radius: f32) -> Self { Self { top_left: radius, @@ -74,6 +76,7 @@ impl BorderRadii { } /// Use a single radius for the bottom corners and zero for the top corners. + #[must_use] pub fn bottom(radius: f32) -> Self { Self { bottom_left: radius, @@ -83,6 +86,7 @@ impl BorderRadii { } /// Use a single radius for the left corners and zero for the right corners. + #[must_use] pub fn left(radius: f32) -> Self { Self { top_left: radius, @@ -92,6 +96,7 @@ impl BorderRadii { } /// Use a single radius for the right corners and zero for the left corners. + #[must_use] pub fn right(radius: f32) -> Self { Self { top_right: radius, @@ -104,7 +109,7 @@ impl BorderRadii { impl From for LyonBorderRadii { fn from(source: BorderRadii) -> Self { // swap top and bottom - LyonBorderRadii { + Self { top_left: source.bottom_left.abs(), top_right: source.bottom_right.abs(), bottom_left: source.top_left.abs(),