diff --git a/Cargo.toml b/Cargo.toml index 21d312b..f7e0099 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,38 +1,40 @@ +#======================# +#=== WORKSPACE INFO ===# + [workspace] resolver = "2" - members = [ - "crates/*", - "examples/*", - ] - exclude = [ - "promo/*", - "examples/*", - "docs/*", - ".gitignore", - ".vscode", - ] + members = ["crates/*", "examples/*"] + exclude = [".vscode", "docs/*", "examples/*", "promo/*", ".gitignore"] + +[workspace.package] + authors = ["IDEDARY"] + version = "0.2.4" + edition = "2021" + license = "MIT OR Apache-2.0" + repository = "https://github.com/bytestring-net/bevy-lunex" + keywords = ["ui", "layout", "bevy", "lunex", "bevy-lunex"] + categories = ["gui", "mathematics", "game-development"] + +#========================# +#=== PACKAGE SETTINGS ===# [profile.dev] opt-level = 1 -[workspace.package] - authors = ["IDEDARY"] - version = "0.2.3" - edition = "2021" - license = "MIT OR Apache-2.0" - repository = "https://github.com/bytestring-net/bevy-lunex" - keywords = ["ui", "layout", "bevy", "lunex", "bevy-lunex"] - categories = ["gui", "mathematics", "game-development"] +#===============================# +#=== DEPENDENCIES & FEATURES ===# [workspace.dependencies] + # LOCAL CRATES + bevy_lunex = { path = "crates/bevy_lunex", version = "0.2.4" } + lunex_engine = { path = "crates/lunex_engine", version = "0.2.4" } - bevy_lunex = { path = "crates/bevy_lunex", version = "0.2.3" } - lunex_engine = { path = "crates/lunex_engine", version = "0.2.3" } - - colored = { version = "^2.1" } - indexmap = { version = "^2.1" } - thiserror = { version = "^1.0" } + # STANDART DEPENDENCIES + colored = { version = "^2.1" } + indexmap = { version = "^2.1" } + thiserror = { version = "^1.0" } + # GAME ENGINE bevy = { version = "^0.14", default-features = false, features = [ "bevy_pbr", "bevy_sprite", @@ -41,5 +43,6 @@ "bevy_gizmos", ] } - bevy_kira_audio = { version = "^0.20" } - bevy_mod_picking = { version = "^0.20", default-features = false, features = ["selection", "backend_raycast"] } \ No newline at end of file + # 3RD-PARTY GAME ENGINE CRATES + bevy_kira_audio = { version = "^0.20" } + bevy_mod_picking = { version = "^0.20", default-features = false, features = ["selection", "backend_raycast"] } diff --git a/README.md b/README.md index 13abdcb..b079530 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ For production ready example/template check out [`Bevypunk source code`](https:/ | Bevy | Bevy Lunex | |--------|-----------------| -| ^ 0.14 | 0.2.0 - 0.2.3 | +| ^ 0.14 | 0.2.0 - 0.2.4 | | 0.13.2 | 0.1.0 | | 0.12.1 | 0.0.10 - 0.0.11 | | 0.12.0 | 0.0.7 - 0.0.9 | diff --git a/crates/bevy_lunex/README.md b/crates/bevy_lunex/README.md index 13abdcb..b079530 100644 --- a/crates/bevy_lunex/README.md +++ b/crates/bevy_lunex/README.md @@ -89,7 +89,7 @@ For production ready example/template check out [`Bevypunk source code`](https:/ | Bevy | Bevy Lunex | |--------|-----------------| -| ^ 0.14 | 0.2.0 - 0.2.3 | +| ^ 0.14 | 0.2.0 - 0.2.4 | | 0.13.2 | 0.1.0 | | 0.12.1 | 0.0.10 - 0.0.11 | | 0.12.0 | 0.0.7 - 0.0.9 | diff --git a/crates/lunex_engine/Cargo.toml b/crates/lunex_engine/Cargo.toml index e4d7a01..26e9df0 100644 --- a/crates/lunex_engine/Cargo.toml +++ b/crates/lunex_engine/Cargo.toml @@ -1,3 +1,6 @@ +#====================# +#=== PACKAGE INFO ===# + [package] name = "lunex_engine" description = "This crate is not inteded to be used standalone. It is a dependency of Bevy_Lunex" @@ -9,10 +12,11 @@ keywords.workspace = true categories.workspace = true +#===============================# +#=== DEPENDENCIES & FEATURES ===# + [dependencies] bevy.workspace = true colored.workspace = true indexmap.workspace = true thiserror.workspace = true - -[features] diff --git a/crates/lunex_engine/src/core/traits.rs b/crates/lunex_engine/src/core/traits.rs index a399887..c784834 100644 --- a/crates/lunex_engine/src/core/traits.rs +++ b/crates/lunex_engine/src/core/traits.rs @@ -3,7 +3,6 @@ use std::borrow::Borrow; use bevy::ecs::component::Component; use crate::nodes::prelude::*; -//use crate::layout; use crate::MasterData; use crate::import::*; @@ -287,49 +286,3 @@ impl UiNodeTreeInitTrait for UiTree { tree } } - - -// #=======================# -// #=== TAILORED TRAITS ===# - -// Trait that [Layout] types implement so they can be build as new node. -/* pub trait BuildAsNode { - /// Build the widget inside the [`UiTree`] at the given path. - fn build(self, ui: &mut UiTree, path: impl Borrow) -> Result<(), NodeError> where Self: Sized; -} -impl BuildAsNode for layout::Boundary { - fn build(self, ui: &mut UiTree, path: impl Borrow) -> Result<(), NodeError> where Self: Sized { - ui.create_node(path.borrow())?; - let mut container: NodeData = NodeData::new(); - container.layout = self.into(); - ui.insert_data(path, container)?; - Ok(()) - } -} -impl BuildAsNode for layout::Window { - fn build(self, ui: &mut UiTree, path: impl Borrow) -> Result<(), NodeError> where Self: Sized { - ui.create_node(path.borrow())?; - let mut container: NodeData = NodeData::new(); - container.layout = self.into(); - ui.insert_data(path, container)?; - Ok(()) - } -} -impl BuildAsNode for layout::Solid { - fn build(self, ui: &mut UiTree, path: impl Borrow) -> Result<(), NodeError> where Self: Sized { - ui.create_node(path.borrow())?; - let mut container: NodeData = NodeData::new(); - container.layout = self.into(); - ui.insert_data(path, container)?; - Ok(()) - } -} -impl BuildAsNode for layout::Div { - fn build(self, ui: &mut UiTree, path: impl Borrow) -> Result<(), NodeError> where Self: Sized { - ui.create_node(path.borrow())?; - let mut container: NodeData = NodeData::new(); - container.layout = self.into(); - ui.insert_data(path, container)?; - Ok(()) - } -} */ diff --git a/docs/src/installation.md b/docs/src/installation.md index ebbfbc0..71c99d5 100644 --- a/docs/src/installation.md +++ b/docs/src/installation.md @@ -6,7 +6,7 @@ Add the following to your `Cargo.toml`: ```toml [dependencies] -bevy_lunex = { version = "0.2.3" } +bevy_lunex = { version = "0.2.4" } ``` Alternatively, you can use the latest bleeding edge version from the Git repository: