mirror of
https://github.com/eliasstepanik/egui_node_graph.git
synced 2026-01-20 02:08:29 +00:00
Merge pull request #92 from kamirr/kek/fix_cursor_in_graph
draw_graph_editor: fix cursor_in_editor
This commit is contained in:
commit
d2eaf38754
@ -114,12 +114,12 @@ where
|
|||||||
// (so for windows it will use up to the resizeably set limit
|
// (so for windows it will use up to the resizeably set limit
|
||||||
// and for a Panel it will fill it completely)
|
// and for a Panel it will fill it completely)
|
||||||
let editor_rect = ui.max_rect();
|
let editor_rect = ui.max_rect();
|
||||||
ui.allocate_rect(editor_rect, Sense::hover());
|
let resp = ui.allocate_rect(editor_rect, Sense::hover());
|
||||||
|
|
||||||
let cursor_pos = ui
|
let cursor_pos = ui
|
||||||
.ctx()
|
.ctx()
|
||||||
.input(|i| i.pointer.hover_pos().unwrap_or(Pos2::ZERO));
|
.input(|i| i.pointer.hover_pos().unwrap_or(Pos2::ZERO));
|
||||||
let mut cursor_in_editor = editor_rect.contains(cursor_pos);
|
let mut cursor_in_editor = resp.hovered();
|
||||||
let mut cursor_in_finder = false;
|
let mut cursor_in_finder = false;
|
||||||
|
|
||||||
// Gets filled with the node metrics as they are drawn
|
// Gets filled with the node metrics as they are drawn
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user