diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 645ee232..591bb1d5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.75.0 + toolchain: 1.76.0 components: clippy, rustfmt - uses: actions/checkout@v3 - uses: actions/cache@v3 @@ -31,7 +31,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo-build-1.75.0-${{ hashFiles('**/Cargo.toml') }} + key: ${{ runner.os }}-cargo-build-1.76.0-${{ hashFiles('**/Cargo.toml') }} - name: Install alsa and udev run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev if: runner.os == 'linux' diff --git a/Cargo.toml b/Cargo.toml index dabdad80..100044e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,11 +13,14 @@ exclude = ["assets/*", "screenshots/*", "book"] [workspace] members = ["kayak_ui_macros", "kayak_font"] +[features] +svg = ["dep:bevy_svg"] + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bevy = { version = "0.12", default-features = false, features = ["bevy_render", "bevy_asset", "bevy_winit", "bevy_core_pipeline"] } -bevy_svg = { version="0.12", default-features = false } +bevy = { version = "0.13", default-features = false, features = ["bevy_render", "bevy_asset", "bevy_core_pipeline"] } +bevy_svg = { git = "https://github.com/arnfaldur/bevy_svg", rev="53a53e5af050a7b5b236068546be46c5729674e3", default-features = false, optional = true } bitflags = "1.3.2" bytemuck = "1.12" dashmap = "5.4" @@ -33,11 +36,12 @@ reorder = "2.1" resources = "1.1" usvg = "0.27" uuid = { version = "1.3", features = ["v4"] } +smol_str = {version = "0.2", default-features = false} [dev-dependencies] fastrand = "1.8" -bevy-inspector-egui = "0.21" -bevy = { version = "0.12", default-features = true } +bevy-inspector-egui = "0.23" +bevy = { version = "0.13", default-features = true } [[example]] name = "tabs" @@ -47,5 +51,21 @@ path = "examples/tabs/tabs.rs" name = "todo" path = "examples/todo/todo.rs" +[[example]] +name = "svg" +path = "examples/svg.rs" +test = false +doc = false +bench = false +required-features = ["svg"] + +[[example]] +name = "accordion" +path = "examples/accordion.rs" +test = false +doc = false +bench = false +required-features = ["svg"] + [package.metadata.docs.rs] features = ["bevy/x11"] diff --git a/examples/avsb.rs b/examples/avsb.rs index 836f846f..544df759 100644 --- a/examples/avsb.rs +++ b/examples/avsb.rs @@ -202,7 +202,10 @@ fn startup( commands.spawn((widget_context, EventDispatcher::default())); } -fn swap(input: Res>, mut query: Query<&mut AvsBState, Without>) { +fn swap( + input: Res>, + mut query: Query<&mut AvsBState, Without>, +) { if input.just_pressed(KeyCode::Space) { for mut avsb in query.iter_mut() { avsb.is_a = !avsb.is_a; diff --git a/examples/bevy_scene.rs b/examples/bevy_scene.rs index a33793f8..705938fc 100644 --- a/examples/bevy_scene.rs +++ b/examples/bevy_scene.rs @@ -38,7 +38,7 @@ struct WorldCamera; /// to filter out clicks that occur over the UI fn set_active_tile_target( mut tile: Query<&mut ActiveTile>, - cursor: Res>, + cursor: Res>, event_context: Query<&EventDispatcher, With>, camera_transform: Query<&GlobalTransform, With>, window: Query<&Window, With>, diff --git a/examples/demo.rs b/examples/demo.rs index d4f15421..0b235180 100644 --- a/examples/demo.rs +++ b/examples/demo.rs @@ -57,7 +57,7 @@ fn startup(mut commands: Commands) { // Note this example shows prop changing not state changing which is quite different. // For state changes please see simple_state example. fn update_resource( - keyboard_input: Res>, + keyboard_input: Res>, mut query: Query<&mut MyWidget, Without>, ) { if keyboard_input.just_pressed(KeyCode::Space) { diff --git a/examples/main_menu.rs b/examples/main_menu.rs index 3e2625db..410a5a53 100644 --- a/examples/main_menu.rs +++ b/examples/main_menu.rs @@ -22,7 +22,7 @@ impl Default for MenuButtonBundle { button: Default::default(), styles: KStyle { bottom: Units::Pixels(20.0).into(), - cursor: KCursorIcon(CursorIcon::Hand).into(), + cursor: KCursorIcon(CursorIcon::Pointer).into(), ..Default::default() }, on_event: OnEvent::default(), diff --git a/examples/render_target.rs b/examples/render_target.rs index 1d5bfec1..d1517509 100644 --- a/examples/render_target.rs +++ b/examples/render_target.rs @@ -62,11 +62,10 @@ fn startup( camera: Camera { order: -1, target: RenderTarget::Image(image_handle.clone()), + clear_color: ClearColorConfig::None, ..Camera::default() }, - camera_2d: Camera2d { - clear_color: bevy::core_pipeline::clear_color::ClearColorConfig::Default, - }, + camera_2d: Camera2d, ..Default::default() }) .insert(CameraUIKayak) @@ -107,7 +106,7 @@ fn startup( }); let cube_size = 4.0; - let cube_handle = meshes.add(Mesh::from(shape::Box::new(cube_size, cube_size, cube_size))); + let cube_handle = meshes.add(Mesh::from(Cuboid::from_size(Vec3::splat(cube_size)))); // This material has the texture that has been rendered. let material_handle = materials.add(StandardMaterial { @@ -169,7 +168,7 @@ fn cube_rotator_system(time: Res