From 42bd98e9edbcbd357f9e14c45699c0d1a273607c Mon Sep 17 00:00:00 2001 From: Setzer22 Date: Tue, 24 May 2022 11:56:03 +0200 Subject: [PATCH] Revert putting the graph inside a window There are a few issues with this approach that have been documented in Issue #27. --- egui_node_graph_example/src/app.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/egui_node_graph_example/src/app.rs b/egui_node_graph_example/src/app.rs index 95cacc2..4caa933 100644 --- a/egui_node_graph_example/src/app.rs +++ b/egui_node_graph_example/src/app.rs @@ -353,13 +353,11 @@ impl eframe::App for NodeGraphExample { /// Called each time the UI needs repainting, which may be many times per second. /// Put your widgets into a `SidePanel`, `TopPanel`, `CentralPanel`, `Window` or `Area`. fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { - let graph_response = egui::Window::new("Graph") + let graph_response = egui::CentralPanel::default() .show(ctx, |ui| { self.state.draw_graph_editor(ui, AllMyNodeTemplates) }) - .unwrap() - .inner - .unwrap(); + .inner; for node_response in graph_response.node_responses { // Here, we ignore all other graph events. But you may find // some use for them. For example, by playing a sound when a new