-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Flag to only take mouse inputs on Titlebar? #5304
Comments
Could you please clarify what do you mean by "my application window"? What kind of window is that? General rule is this:
|
It is a ImGui::Begin() window with a single ImGui::Image() in it. So i want io.WantCaptureMouse = false when i am hovering the ImGui::Image(). Thus a request for the flag ImGuiWindowFlags_OnlyMouseInputsOnTitlebar?
I know and understand the "general rule" for how io.WantCaptureMouse works. I'm wondering whether my use case is common/reasonable enough to warrant the creation of a new window flag. |
Ah so its only imgui windows. We have no such flag. One way to achieve what you want is to use |
|
Thanks, CaptureMouseFromApp(false) is what fits best, |
Using sfml I render my main application to a sf::RenderTexture that I then display on ImGui::Image(). So basically my dockspace and my whole window is at all times completely covered by ImGui begin() windows.
So when i try to dispatch mouse clicks to my application window ( my ImGui::Begin() window containing ImGui::Image where i display my rendered sfml texture.) i want to check if io.WantCaptureMouse.
The problem is that i also want to be able to move my "application" window around. So setting the flag ImGuiWindowFlags_NoMouseInputs does not work.
I read at many places that io.WantCaptureMouse is prefered over IsWindowHovered().
Is this still the case for my use case? Or would a new flag with a name like
ImGuiWindowFlags_OnlyMouseInputsOnTitlebar be a useful addition to the API?
Edit:
Basically i want to create something similiar looking to the "Canvas" demo. But instead of rendering the canvas in ImGui i want to render in SFML to a texture and then display that on a ImGui windows.
Also im using the docking branch, if that matters.
Originally posted by @Bonkt in #52 (comment)
The text was updated successfully, but these errors were encountered: