dhewm3/neo/sys
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
..
aros dhewm3log.txt for AROS 2022-01-16 06:12:51 +01:00
cmake Use stb_vorbis instead of libogg and libvorbis(file) 2021-04-27 20:08:59 +02:00
linux POSIX: log output to save_path/dhewm3log.txt 2022-01-16 06:11:20 +01:00
osx Make it build and work on old PPC Macs again (#568) 2024-03-27 01:04:11 +01:00
posix POSIX: log output to save_path/dhewm3log.txt 2022-01-16 06:11:20 +01:00
stub Make window alpha chan opaque on Wayland, fix #426 2022-02-05 16:34:34 +01:00
win32 Fixup: typo: 'hiehgt' -> 'height' in a few places around the codebase 2023-02-04 19:34:29 +01:00
cpu.cpp Fix sys/cpu.cpp for msvc 64bit 2012-07-06 01:06:59 +02:00
doom_icon.h Window Icon, make in_nograb work with SDL2 2015-03-02 00:03:30 +01:00
events.cpp Dhewm3SettingsMenu: Improve cursor handling and opening menu ingame 2024-05-28 04:49:24 +02:00
glimp.cpp Initial ImGui integration in the engine 2024-05-22 19:46:38 +02:00
imgui_savestyle.cpp ImGui styles: Allow writing only changed values to C++ code 2024-05-26 03:56:28 +02:00
platform.h Don't use GCC's __builtin_alloca_with_align(), fix #572 2024-04-19 07:24:32 +02:00
proggyvector_font.h ImGui: Improve integration, use scalable font, Control Options menu 2024-05-22 19:46:38 +02:00
sys_imgui.cpp Dhewm3SettingsMenu: Improve cursor handling and opening menu ingame 2024-05-28 04:49:24 +02:00
sys_imgui.h Dhewm3SettingsMenu: Improve cursor handling and opening menu ingame 2024-05-28 04:49:24 +02:00
sys_local.cpp Get rid of Sys_FPU_StackIsEmpty() 2012-07-06 01:06:53 +02:00
sys_local.h Get rid of Sys_FPU_StackIsEmpty() 2012-07-06 01:06:53 +02:00
sys_public.h Some functions that will be used by the ImGui keybinding menu 2024-05-22 19:46:38 +02:00
threads.cpp Fix SDL1.2 build and type of xthreadInfo::threadId 2023-01-16 03:22:01 +01:00