egui_node_graph icon indicating copy to clipboard operation
egui_node_graph copied to clipboard

feat: migrate to egui 0.24

Open SergioRibera opened this issue 2 years ago • 5 comments

I updated egui to the latest version and also added the example in the workspace ignore since it is not really necessary to bring it to a library release

SergioRibera avatar Nov 28 '23 03:11 SergioRibera

These fixes also seem to work for eframe and egui 0.25.0.

Resonanz avatar Feb 02 '24 02:02 Resonanz

These fixes also seem to work for eframe and egui 0.25.0.

Incredible, I had not seen that there is another version, as soon as I have time I will update the PR :D

SergioRibera avatar Feb 02 '24 04:02 SergioRibera

From what I can tell (though this is my first attempt to do anything with egui), the example code does not work with egui 0.26. With 0.25, then a right-click opens the node finder but if I change to 0.26 then the right-click does nothing. From a quick print statement it seems that cursor_in_editor:

https://github.com/setzer22/egui_node_graph/blob/3068b8cd9bad3a419682af273c01cd700bda2739/egui_node_graph/src/editor_ui.rs#L125

is false for those clicks in 0.26 but true in 0.25. I don't know why. I can't see anything in the changelog that would necessary line up with this: https://github.com/emilk/egui/blob/master/CHANGELOG.md#0260---2024-02-05---text-selection-in-labels

Edit: From what I can tell it doesn't work with 0.26.1 either.

michaeljones avatar Feb 09 '24 20:02 michaeljones

I've tried with 0.26.2 to remove && cursor_in_editor from this line: https://github.com/setzer22/egui_node_graph/blob/3068b8cd9bad3a419682af273c01cd700bda2739/egui_node_graph/src/editor_ui.rs#L411 Now right click partially works, but only when you drag and release, while click and release still doesn't work!

leongor avatar Mar 11 '24 21:03 leongor

What fixed it for me additionally to removing cursor_in_editor is replacing this line: https://github.com/setzer22/egui_node_graph/blob/3068b8cd9bad3a419682af273c01cd700bda2739/egui_node_graph/src/editor_ui.rs#L424 with

        if mouse.any_pressed() && !cursor_in_finder {

leongor avatar Mar 13 '24 21:03 leongor