diff --git a/Cargo.toml b/Cargo.toml index 4fc9f7b..14a4163 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ 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" @@ -31,12 +31,12 @@ if-addrs = { version = "0.13.0" } hostname = { version = "0.3.1" } 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