From 97201b99ccc3158265a35897b39d5c22f1900427 Mon Sep 17 00:00:00 2001 From: Piotr Siuszko Date: Sun, 21 Jul 2024 13:35:18 +0200 Subject: [PATCH] Update to 0.14 --- Cargo.toml | 6 +++--- README.md | 1 + src/lib.rs | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 28fce5f..363a02c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_simple_scroll_view" -version = "0.1.0" +version = "0.2.0" edition = "2021" exclude = [".github/","wasm/", "record.gif"] categories = ["game-development", "gui"] @@ -11,10 +11,10 @@ license = "MIT OR Apache-2.0" description = "Simple to use plugin implementing ScrollView into Bevy engine." [dependencies.bevy] -version = "0.13" +version = "0.14" default-features = false features = ["bevy_ui", "bevy_asset", "bevy_text"] [dev-dependencies.bevy] -version = "0.13" +version = "0.14" default-features = true diff --git a/README.md b/README.md index 6abede1..36e7d46 100644 --- a/README.md +++ b/README.md @@ -36,4 +36,5 @@ Please keep PRs small and scoped to a single feature or fix. Bevy version | crate version --- | --- +0.14 | 0.2 0.13 | 0.1 diff --git a/src/lib.rs b/src/lib.rs index 3695f34..72938e4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -88,6 +88,7 @@ fn input_mouse_pressed_move( if let Ok(item) = content_q.get_mut(child) { let mut scroll = item.0; let max_scroll = (item.1.size().y - container_height).max(0.0); + info!("CONTAINER {}, max_scroll: {}",container_height,max_scroll); scroll.pos_y += evt.delta.y; scroll.pos_y = scroll.pos_y.clamp(-max_scroll, 0.); } @@ -115,6 +116,7 @@ fn input_touch_pressed_move( if let Ok(item) = content_q.get_mut(child) { let mut scroll = item.0; let max_scroll = (item.1.size().y - container_height).max(0.0); + info!("CONTAINER {}, max_scroll: {}",container_height,max_scroll); scroll.pos_y += touch.delta().y; scroll.pos_y = scroll.pos_y.clamp(-max_scroll, 0.); }