diff --git a/egui_node_graph/src/editor_ui.rs b/egui_node_graph/src/editor_ui.rs index 87cae96..636614a 100644 --- a/egui_node_graph/src/editor_ui.rs +++ b/egui_node_graph/src/editor_ui.rs @@ -51,7 +51,15 @@ pub enum NodeResponse /// user code react to specific events that happened when drawing the graph. #[derive(Clone, Debug)] pub struct GraphResponse { + /// Events that occurred during this frame of rendering the graph. Check the + /// [`UserResponse`] type for a description of each event. pub node_responses: Vec>, + /// Is the mouse currently hovering the graph editor? Note that the node + /// finder is considered part of the graph editor, even when it floats + /// outside the graph editor rect. + pub cursor_in_editor: bool, + /// Is the mouse currently hovering the node finder? + pub cursor_in_finder: bool, } impl Default for GraphResponse @@ -59,6 +67,8 @@ impl Default fn default() -> Self { Self { node_responses: Default::default(), + cursor_in_editor: false, + cursor_in_finder: false, } } } @@ -418,6 +428,8 @@ where GraphResponse { node_responses: delayed_responses, + cursor_in_editor, + cursor_in_finder, } } }