mirror of
https://github.com/eliasstepanik/egui_node_graph.git
synced 2026-01-11 05:48:27 +00:00
Revert putting the graph inside a window
There are a few issues with this approach that have been documented in Issue #27.
This commit is contained in:
parent
24036d1294
commit
42bd98e9ed
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user