Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

feat: migrate to egui 0.24 #111

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SergioRibera
Copy link

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

@Resonanz
Copy link

Resonanz commented Feb 2, 2024

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

@SergioRibera
Copy link
Author

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

@michaeljones
Copy link

michaeljones commented Feb 9, 2024

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:

let mut cursor_in_editor = resp.hovered();

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.

@leongor
Copy link

leongor commented Mar 11, 2024

I've tried with 0.26.2 to remove && cursor_in_editor
from this line:

if mouse.secondary_released() && cursor_in_editor && !cursor_in_finder {

Now right click partially works, but only when you drag and release, while click and release still doesn't work!

@leongor
Copy link

leongor commented Mar 13, 2024

What fixed it for me additionally to removing cursor_in_editor is replacing this line:

if click_on_background || (mouse.any_click() && !cursor_in_editor) {

with

        if mouse.any_pressed() && !cursor_in_finder {

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants