Closed fkaa closed 2 years ago
Thanks for this! :tada: It had been bugging me for a while but I didn't have time to fix it.
The code looks good, but there's a few issues caught by CI.
Other than a few clippy lints, you're using a button_released
function that seems to be unreleased. Are you on a patched version of egui? Maybe we can use (EDIT: That won't work, we need to detect a mouse release on the secondary button).any_released
for the time being, and leave a TODO
explaining that this should be using button_released
on the next egui release.
Unfortunately, there doesn't seem to be much we can do to fix this before the next egui release. All the functions or fields we could read from to implement this on our end are private or pub(crate)
. Should we keep using button_down
for the time being?
Ah sorry, yes I'm using the main branch of egui locally. I'm fine with waiting for the next release.
It doesn't look like next egui version will release anytime soon, so for the time being I'll merge this using secondary_down
instead of button_released
. It's not exactly correct but all your other changes still work :)
Fixes panning outside of the editor area, and being able to open a new finder by clicking inside the finder window. Also makes it so the finder area is always on top. It seemed to disappear when clicking twice in a editor area for some reason.
Tested in my program and seems to work.