Page 1 of 1

ImGUI window start and exit

Posted: Mon Jun 09, 2025 3:43 pm
by slapin

Hi, all!
When I start ImGUI I see a window and mouse cursor is shown. Everything works. Then I want to go back to mouse grabbed 3d view to control my character. How can I do that?

More complex case: I want to go back to mouse grabbed 3d view (with cursor off) without closing some of ImGUI windows.

Even more complex case: When clicking some widget with mouse and holding it it should be grabbed (and cursor off) and I should be able to move it around without leaving the window and when I release it I should be able to get it ungrabbed and get my cursor back. Possible?


Re: ImGUI window start and exit

Posted: Mon Jun 09, 2025 5:44 pm
by slapin

Code: Select all

setWindowGrab(true);

solves all the problems I have. Just need to make sure nothing is focused.


Re: ImGUI window start and exit

Posted: Mon Jun 09, 2025 8:47 pm
by slapin

The problem is I have to track inputs a bit differently when UI is active, but otherwise I guess whole problem is solved.