diff --git a/Cargo.toml b/Cargo.toml index cb39aa36bdc0e70a9c030b4997b23617922b0556..32127e8f78041c73f53d3d0c36ac1b134cd4d40a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kayak_ui" description = "A UI library built using the bevy game engine!" -version = "0.3.0" +version = "0.4.0" edition = "2021" resolver = "2" authors = ["John Mitchell"] @@ -17,21 +17,21 @@ members = ["kayak_ui_macros", "kayak_font"] [dependencies] bevy = { version = "0.10", default-features = false, features = ["bevy_render", "bevy_sprite", "bevy_asset", "bevy_winit", "bevy_core_pipeline", "bevy_ui"] } +bevy_svg = { version="0.10.1", default-features = false } +bitflags = "1.3.2" bytemuck = "1.12" dashmap = "5.4" -kayak_font = { path = "./kayak_font", version = "0.3" } -morphorm = "0.3" -kayak_ui_macros = { path = "./kayak_ui_macros", version = "0.3" } +fancy-regex = "0.11.0" indexmap = "1.9" +instant = "0.1" +interpolation = { version = "0.2" } +kayak_font = { path = "./kayak_font", version = "0.4" } +kayak_ui_macros = { path = "./kayak_ui_macros", version = "0.4" } log = "0.4" -bitflags = "1.3.2" +morphorm = "0.3" reorder = "2.1" resources = "1.1" -instant = "0.1" -bevy_svg = { git = "https://github.com/StarArawn/bevy_svg", rev = "9a14eccf680b7fa98f6494fc10e8aaa5931de5c8", default-features = false } -interpolation = { version = "0.2" } usvg = "0.27" -fancy-regex = "0.11.0" uuid = { version = "1.3", features = ["v4"] } [dev-dependencies] diff --git a/README.md b/README.md index b4702e45b53de3de6c4167f881f28143bac4519c..734a56d48460d0240c5016fe2541549d38b6aa82 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ Kayak UI is in the very early stages of development. Important features are miss - Fully integrated into bevy to capture input events, use bevy assets(images, etc). - Dpi Scaling - Batched Rendering +- Opacity Layers +- Custom Materials ## Missing features - More default widgets. @@ -48,14 +50,15 @@ Kayak UI is in the very early stages of development. Important features are miss Use bevy `0.10`! Make sure the version of Kayak you are using uses the same version of bevy. ```rust -kayak_ui = "0.3" +kayak_ui = "0.4" bevy = "0.10" ``` |bevy|kayak_ui| |---|---| |`main`|`bevy-track`| -|0.10|0.3| +|0.10.x|0.4| +|0.10.x|0.3| |0.9|0.2| |0.9|0.1| diff --git a/book/src/chapter_1.md b/book/src/chapter_1.md index 44eee695895a791bdf702ca5195b61e8ea4c56f8..ab3ea638bb96274e148f70a125724812e1b6921c 100644 --- a/book/src/chapter_1.md +++ b/book/src/chapter_1.md @@ -2,7 +2,7 @@ Kayak UI is quite easy to setup! First make sure you add it to your cargo.toml file in your project. ```toml -kayak_ui = "0.2" +kayak_ui = "0.4" ``` Once you've added Kayak UI to your bevy project you can now start to use it! In order for you to copy and run this in your own project don't forget to move the `roboto.kayak_font` and the `roboto.png` files to your asset folder. Optionally you can also generate your own font! See: [Chapter 5 - Fonts](./chapter_6.md) diff --git a/kayak_font/Cargo.toml b/kayak_font/Cargo.toml index effd523d3d88d887293a38ac10078fbc315bdd4f..721390f3f1482d9f10667cb31001546a39b1e9f3 100644 --- a/kayak_font/Cargo.toml +++ b/kayak_font/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kayak_font" description = "An SDF font renderer for Kayak UI and the Bevy game engine" -version = "0.3.0" +version = "0.4.0" edition = "2021" resolver = "2" authors = ["John Mitchell"] diff --git a/kayak_ui_macros/Cargo.toml b/kayak_ui_macros/Cargo.toml index 3689da71b3cb1f04b1538ca0ec16fc557064e2aa..384a37484d15937ecac5e90e7d5f86e165f807e4 100644 --- a/kayak_ui_macros/Cargo.toml +++ b/kayak_ui_macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kayak_ui_macros" description = "A proc macro library that provides RSX like syntax for Kayak UI." -version = "0.3.0" +version = "0.4.0" edition = "2021" resolver = "2" authors = ["John Mitchell"] diff --git a/src/widgets/icons/mod.rs b/src/widgets/icons/mod.rs index 6174ddd8f54b81097d0c6f12ca6c02e661e61ea2..5c7e85868530ca79f4e831559c188aeb136374eb 100644 --- a/src/widgets/icons/mod.rs +++ b/src/widgets/icons/mod.rs @@ -1,4 +1,4 @@ -use std::path::Path; +use std::path::{Path, PathBuf}; use bevy::{ prelude::{Assets, HandleUntyped, Mesh, Plugin}, @@ -17,8 +17,10 @@ impl Plugin for IconsPlugin { fn build(&self, app: &mut bevy::prelude::App) { let expand_less_bytes = include_bytes!("expand_less.svg"); let expand_more_bytes = include_bytes!("expand_more.svg"); - let mut expand_less = Svg::from_bytes(expand_less_bytes, Path::new("")).unwrap(); - let mut expand_more = Svg::from_bytes(expand_more_bytes, Path::new("")).unwrap(); + let mut expand_less = + Svg::from_bytes(expand_less_bytes, Path::new(""), None::<PathBuf>).unwrap(); + let mut expand_more = + Svg::from_bytes(expand_more_bytes, Path::new(""), None::<PathBuf>).unwrap(); let mut meshes = app.world.get_resource_mut::<Assets<Mesh>>().unwrap(); expand_less.mesh = meshes.add(expand_less.tessellate());