From 05292a1dfd5bc80eabaeda62813751ee02fc4b1c Mon Sep 17 00:00:00 2001 From: Dmitry Stepanov Date: Wed, 30 Oct 2024 11:05:32 +0300 Subject: [PATCH] more dockable windows --- editor/src/lib.rs | 9 +++++---- editor/src/scene/settings/mod.rs | 2 +- editor/src/settings/mod.rs | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/editor/src/lib.rs b/editor/src/lib.rs index b1266fa29..a4e4145f4 100644 --- a/editor/src/lib.rs +++ b/editor/src/lib.rs @@ -612,6 +612,7 @@ impl Editor { let menu = Menu::new(&mut engine, message_sender.clone(), &settings); let light_panel = LightPanel::new(&mut engine, message_sender.clone()); let audio_panel = AudioPanel::new(&mut engine, message_sender.clone()); + let material_editor = MaterialEditor::new(&mut engine, message_sender.clone()); let ctx = &mut engine.user_interfaces.first_mut().build_ctx(); let navmesh_panel = NavmeshPanel::new(scene_viewer.frame(), ctx, message_sender.clone()); @@ -632,6 +633,7 @@ impl Editor { let doc_window = DocWindow::new(ctx); let node_removal_dialog = NodeRemovalDialog::new(ctx); let ragdoll_wizard = RagdollWizard::new(ctx, message_sender.clone()); + let scene_settings = SceneSettingsWindow::new(ctx, message_sender.clone()); let docking_manager; let root_grid = GridBuilder::new( @@ -762,6 +764,9 @@ impl Editor { navmesh_panel.window, doc_window.window, light_panel.window, + menu.file_menu.settings.window, + scene_settings.window, + material_editor.window, ]) .build(ctx); docking_manager @@ -800,10 +805,6 @@ impl Editor { let build_window = BuildWindow::new(ctx); - let scene_settings = SceneSettingsWindow::new(ctx, message_sender.clone()); - - let material_editor = MaterialEditor::new(&mut engine, message_sender.clone()); - if let Some(layout) = settings.windows.layout.as_ref() { engine .user_interfaces diff --git a/editor/src/scene/settings/mod.rs b/editor/src/scene/settings/mod.rs index d4b46952a..2522ee301 100644 --- a/editor/src/scene/settings/mod.rs +++ b/editor/src/scene/settings/mod.rs @@ -95,7 +95,7 @@ impl SceneSettingsWindow { } pub fn open(&self, ui: &UserInterface) { - ui.send_message(WindowMessage::open_modal( + ui.send_message(WindowMessage::open( self.window, MessageDirection::ToWidget, true, diff --git a/editor/src/settings/mod.rs b/editor/src/settings/mod.rs index 48b018106..66f22cd14 100644 --- a/editor/src/settings/mod.rs +++ b/editor/src/settings/mod.rs @@ -92,7 +92,7 @@ pub mod selection; pub mod windows; pub struct SettingsWindow { - window: Handle, + pub window: Handle, ok: Handle, default: Handle, inspector: Handle,