mirror of
https://github.com/eliasstepanik/egui_node_graph.git
synced 2026-01-11 22:08:28 +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.
|
/// 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`.
|
/// Put your widgets into a `SidePanel`, `TopPanel`, `CentralPanel`, `Window` or `Area`.
|
||||||
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
|
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| {
|
.show(ctx, |ui| {
|
||||||
self.state.draw_graph_editor(ui, AllMyNodeTemplates)
|
self.state.draw_graph_editor(ui, AllMyNodeTemplates)
|
||||||
})
|
})
|
||||||
.unwrap()
|
.inner;
|
||||||
.inner
|
|
||||||
.unwrap();
|
|
||||||
for node_response in graph_response.node_responses {
|
for node_response in graph_response.node_responses {
|
||||||
// Here, we ignore all other graph events. But you may find
|
// Here, we ignore all other graph events. But you may find
|
||||||
// some use for them. For example, by playing a sound when a new
|
// some use for them. For example, by playing a sound when a new
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user