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

Click through window background but not widgets #6673

Closed
pozemka opened this issue Aug 1, 2023 · 1 comment
Closed

Click through window background but not widgets #6673

pozemka opened this issue Aug 1, 2023 · 1 comment
Labels

Comments

@pozemka
Copy link

pozemka commented Aug 1, 2023

Hello!

image
On this picture the "aaaaa" button is on the "hover" window and the "upgrade me" button is on the window underneath. I need the ability to click on both of them

Is there a way to pass through clicks on widnow background but handle clicks on widgets?

I tired window with ImGuiWindowFlags_NoBackground flag, but clicks are not going to underlying window.

If I use ImGuiWindowFlags_NoMouseInputs flag then button on my window doesn't handle click bu all other clicks are going throgh.

I've read through FAQ and closest thig is this but can't figure how it could help me.

@ocornut ocornut added the inputs label Aug 2, 2023
@ocornut
Copy link
Owner

ocornut commented Aug 2, 2023

Is there a way to pass through clicks on widnow background but handle clicks on widgets?

No. It's not possible between two root windows and unlikely to be ever easily possible.

The only facility available is imgui_internal.h's SetWindowHitTestHole() to declare a rectangle shaped hit testing hole in a window.

Also see #3368 and #1512.

@ocornut ocornut closed this as completed Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants