From 4874b99a12656c3175b74caab518229d738d1ec5 Mon Sep 17 00:00:00 2001 From: Dmitry Stepanov Date: Tue, 26 Nov 2024 18:58:40 +0300 Subject: [PATCH] added style resource loader + register built in style resource --- fyrox-impl/src/engine/mod.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fyrox-impl/src/engine/mod.rs b/fyrox-impl/src/engine/mod.rs index 113b1ce01..f6cada6e2 100644 --- a/fyrox-impl/src/engine/mod.rs +++ b/fyrox-impl/src/engine/mod.rs @@ -29,7 +29,6 @@ pub mod task; mod hotreload; -use crate::scene::node::constructor::new_node_constructor_container; use crate::{ asset::{ event::ResourceEvent, @@ -56,6 +55,7 @@ use crate::{ constructor::WidgetConstructorContainer, font::{loader::FontLoader, Font, BUILT_IN_FONT}, loader::UserInterfaceLoader, + style::{self, resource::StyleLoader, Style}, UiContainer, UiUpdateSwitches, UserInterface, }, material::{ @@ -80,7 +80,10 @@ use crate::{ graph::{GraphUpdateSwitches, NodePool}, mesh::surface::{self, SurfaceData, SurfaceDataLoader}, navmesh, - node::{constructor::NodeConstructorContainer, Node}, + node::{ + constructor::{new_node_constructor_container, NodeConstructorContainer}, + Node, + }, sound::SoundEngine, tilemap::{ brush::{TileMapBrush, TileMapBrushLoader}, @@ -1177,6 +1180,7 @@ pub(crate) fn initialize_resource_manager_loaders( state.built_in_resources.add(BUILT_IN_FONT.clone()); state.built_in_resources.add(texture::PLACEHOLDER.clone()); + state.built_in_resources.add(style::DEFAULT_STYLE.clone()); for material in [ &*material::STANDARD, @@ -1213,6 +1217,7 @@ pub(crate) fn initialize_resource_manager_loaders( state.constructors_container.add::(); state.constructors_container.add::(); state.constructors_container.add::(); + state.constructors_container.add::