dhewm3/neo
Daniel Gibson 4bdee4f638 Dhewm3SettingsMenu: Improve cursor handling and opening menu ingame
Pause the game (with g_stopTime) when the settings menu is opened
while ingame, unpause it when it's closed.
If the menu is open while ingame and an ImGui window has focus,
the mouse cursor is shown. If the player clicks outside an ImGui window,
it gets unfocused and the cursor is hidden and the player can look
around. Pressing F10 (or whatever key is bound to "dhewm3Settings")
will give focus back to an open ImGui window, pressing it again then
will close the settings window, pressing it once again afterwards will
open the settings window again.

handleMouseGrab() (in sys/events.cpp) now checks if sys_imgui thinks
that a cursor should be shown (via D3::ImGuiHooks::ShouldShowCursor())
and if so, shows it and ungrabs the mouse. This, together with
D3::ImGuiHooks::NewFrame() checking ShouldShowCursor() to (unset)
ImGuiConfigFlags_NoMouseCursorChange, should prevent flickering cursor
problems that sometimes occurred when ImGui's SDL2 backend and dhewm3
disagreed on whether the cursor should be visible.
2024-05-28 04:49:24 +02:00
..
cm Fix/work around other misc. compiler warnings 2023-01-05 09:06:34 +01:00
d3xp Initialize variabls ubsan complained about 2024-03-20 18:32:26 +01:00
framework Dhewm3SettingsMenu: Improve cursor handling and opening menu ingame 2024-05-28 04:49:24 +02:00
game Make Sys_SetInteractiveIngameGuiActive() work better 2024-03-17 04:03:27 +01:00
idlib Bind F10 to open dhewm3Settings menu, unless F10 is already bound 2024-05-23 19:29:38 +02:00
libs/imgui Update ImGui to 1.90.6 2024-05-22 19:46:38 +02:00
MayaImport s/LittleLong/LittleInt/ to match the return type 2012-06-28 13:02:47 +02:00
renderer Initial ImGui integration in the engine 2024-05-22 19:46:38 +02:00
sound Make it build and work on old PPC Macs again (#568) 2024-03-27 01:04:11 +01:00
sys Dhewm3SettingsMenu: Improve cursor handling and opening menu ingame 2024-05-28 04:49:24 +02:00
tools Fixup: typo: 'hiehgt' -> 'height' in a few places around the codebase 2023-02-04 19:34:29 +01:00
TypeInfo Get rid of Sys_FPU_StackIsEmpty() 2012-07-06 01:06:53 +02:00
ui Fix cursor focus for gamepads, once again, #566 2024-03-20 18:31:28 +01:00
CMakeLists.txt sys_imgui.cpp: Move code to read/write style to imgui_savestyle.cpp 2024-05-25 06:58:19 +02:00
config.h.in Introduce CMAKE_INSTALL_PREFIX relative paths 2012-07-04 02:18:42 +02:00
mmakefile.src # move the AROS specific folder icon and default.cfg mmakefile.src under neo/sys/aros/setup 2017-04-22 16:21:14 +02:00