Skip to content

Commit

Permalink
more dockable windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Oct 30, 2024
1 parent a790572 commit 05292a1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions editor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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(
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion editor/src/scene/settings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion editor/src/settings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub mod selection;
pub mod windows;

pub struct SettingsWindow {
window: Handle<UiNode>,
pub window: Handle<UiNode>,
ok: Handle<UiNode>,
default: Handle<UiNode>,
inspector: Handle<UiNode>,
Expand Down

0 comments on commit 05292a1

Please sign in to comment.