mirror of
https://github.com/eliasstepanik/egui_node_graph.git
synced 2026-01-10 21:38:27 +00:00
Change button_released for secondary_down
The code in the original PR was correct, but button_released is not available on egui 0.18 from crates.io, this commit moves back to the old behavior of using secondary_down instead.
This commit is contained in:
parent
1ced8c5609
commit
b91610c7ee
@ -248,18 +248,15 @@ where
|
||||
self.connection_in_progress = None;
|
||||
}
|
||||
|
||||
if mouse.button_released(PointerButton::Secondary) && cursor_in_editor && !cursor_in_finder
|
||||
{
|
||||
if mouse.secondary_down() && cursor_in_editor && !cursor_in_finder {
|
||||
self.node_finder = Some(NodeFinder::new_at(cursor_pos));
|
||||
}
|
||||
if ui.ctx().input().key_pressed(Key::Escape) {
|
||||
self.node_finder = None;
|
||||
}
|
||||
|
||||
if r.dragged() {
|
||||
if ui.ctx().input().pointer.middle_down() {
|
||||
self.pan_zoom.pan += ui.ctx().input().pointer.delta();
|
||||
}
|
||||
if r.dragged() && ui.ctx().input().pointer.middle_down() {
|
||||
self.pan_zoom.pan += ui.ctx().input().pointer.delta();
|
||||
}
|
||||
|
||||
// Deselect and deactivate finder if the editor backround is clicked,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user