Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating window for egui #195

Closed
timmyL17 opened this issue Feb 16, 2022 · 4 comments
Closed

Floating window for egui #195

timmyL17 opened this issue Feb 16, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@timmyL17
Copy link

Just getting started with this library, and I had a quick question. Is there a way to get the floating windows that egui has to work, or do we need to use side/top panels currently? I guess it seems like no, because the examples just redefine the viewport to exclude the side panel gui. But that approach probably wouldn't work with a floating moveable window?

@timmyL17 timmyL17 changed the title Separate mouse events from gui and main area? Floating window for egui Feb 16, 2022
@asny
Copy link
Owner

asny commented Feb 17, 2022

That's a good question. I haven't tested it but should be possible, just render the 3d scene first and then the GUI on top? The examples will also work with this approach, the reason why the viewport excludes the side panel is to have a correct aspect ratio of the camera. Actually, I guess color pickers use floating windows and I think I use those in an example, can't remember which one.

@timmyL17
Copy link
Author

timmyL17 commented Feb 18, 2022

It does render correctly. I think I wasn't clear in my question. The interaction with the window (dragging, resizing, minimizing, etc.) doesn't really work. And the mouse clicks/drags go through to the scene below, even if they are over the gui. I was wondering if there was an easy way to handle all that interaction, but it looks like there's nothing built in currently.

@asny
Copy link
Owner

asny commented Feb 18, 2022

There's a flag on each event saying if it has been handled specifically for this purpose, so it sounds like a bug to me. Will reopen the issue.

@asny asny reopened this Feb 18, 2022
@asny asny added the bug Something isn't working label Mar 10, 2022
@asny
Copy link
Owner

asny commented Apr 25, 2022

I finally had time to look at it again and I’ve fixed the one issue that I’ve found with floating windows (also described in #235). I’m not really sure what else is wrong, seems to work just fine (resizing, dragging, minimizing). Anyway, if there are still issues, please report again. Also, when #216 is done, egui issues should be reported to egui 🙂

@asny asny closed this as completed Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants