diff --git a/Cargo.toml b/Cargo.toml index e9be0a4..d50a8c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = ["character_window", "map", "rpg_components"] [workspace.dependencies] destructure_traitobject = "0.3.0" -itertools = "0.13.0" +itertools = "0.14.0" serde = { version = "1.0.203", features = ["derive"] } ron = "0.8.1" paste = "1.0.15" @@ -14,14 +14,14 @@ chrono = { version = "0.4.35", features = ["serde"] } anyhow = { version = "1.0.86", features = ["backtrace"] } indexmap = { version = "2.2.6", features = ["rayon"] } shaderc = { version = "0.8.3", features = ["build-from-source"] } -rusqlite = { version = "0.32.0", features = ["bundled"] } +rusqlite = { version = "0.33.0", features = ["bundled"] } cgmath = "0.18.0" http = "1.1.0" iterchunks = "0.5.0" reqwest = { version = "0.12.5", features = ["blocking"] } shared_library = "0.1.9" gltf = { version = "1.4.1", features = ["extras", "names"] } -mlua = { version = "0.9.9", features = ["lua54", "send", "vendored"] } +mlua = { version = "0.10.0", features = ["lua54", "send", "vendored"] } public-ip = { version = "0.2.2", default-features = false, features = [ "all-providers", "tokio-dns-resolver", @@ -31,12 +31,12 @@ if-addrs = { version = "0.13.0" } hostname = { version = "0.4.0" } trust-dns-resolver = { version = "0.23.2" } openxr = { version = "0.19.0", default-features = false, features = ["static"] } -openvr = { version = "0.6.0" } +openvr = { version = "0.7.0" } sdl2 = { version = "0.37.0" } syn = { version = "2.0.67", features = ["extra-traits", "full"] } quote = "1.0.35" proc-macro2 = "1.0.86" -downcast-rs = "1.2.1" +downcast-rs = "2.0.0" utilities = { git = "https://gavania.de/hodasemi/utilities.git" } vulkan-rs = { git = "https://gavania.de/hodasemi/vulkan_lib.git" } diff --git a/character_window/src/lib.rs b/character_window/src/lib.rs index 981557d..83940c7 100644 --- a/character_window/src/lib.rs +++ b/character_window/src/lib.rs @@ -6,7 +6,7 @@ mod page_content; mod traits; use anyhow::Result; -use downcast_rs::{impl_downcast, Downcast}; +use downcast_rs::{Downcast, impl_downcast}; use engine::prelude::*; use rpg_components::{ components::{ @@ -21,8 +21,8 @@ use std::{ collections::HashMap, ops::{Deref, DerefMut}, sync::{ - atomic::{AtomicUsize, Ordering::SeqCst}, Arc, Mutex, RwLock, RwLockReadGuard, RwLockWriteGuard, + atomic::{AtomicUsize, Ordering::SeqCst}, }, }; @@ -125,19 +125,19 @@ pub struct CharacterWindow { tabs: RwLock<[Box; 3]>, tab: AtomicUsize, - - engine: Arc, } impl CharacterWindow { pub fn new( - engine: Arc, + world: &World, hero: Entity, name: &str, close: Box, ) -> Result> { - let menu_gui = - GuiBuilder::from_str(engine.gui_handler(), include_str!("../resources/menu.xml"))?; + let menu_gui = GuiBuilder::from_str( + world.resources.get::>(), + include_str!("../resources/menu.xml"), + )?; let content_grid = menu_gui.element("tab_content")?; let open_character_page: Arc