-
Notifications
You must be signed in to change notification settings - Fork 341
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
Integrate Dear ImGui and implement a new settings menu with it + more #576
Commits on May 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 07f7d14 - Browse repository at this point
Copy the full SHA 07f7d14View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33ed999 - Browse repository at this point
Copy the full SHA 33ed999View commit details -
Initial ImGui integration in the engine
still a bit hacky, but shows imgui windows that can be clicked etc
Configuration menu - View commit details
-
Copy full SHA for c0c82e7 - Browse repository at this point
Copy the full SHA c0c82e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8fce796 - Browse repository at this point
Copy the full SHA 8fce796View commit details -
Start ImGui-based settings menu
the integration of that at least, the menu is still a stub
Configuration menu - View commit details
-
Copy full SHA for ffaf135 - Browse repository at this point
Copy the full SHA ffaf135View commit details -
Configuration menu - View commit details
-
Copy full SHA for 86be2eb - Browse repository at this point
Copy the full SHA 86be2ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for c9a8901 - Browse repository at this point
Copy the full SHA c9a8901View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0418f62 - Browse repository at this point
Copy the full SHA 0418f62View commit details -
Add idStr::(V)Format(), make idList compatible with C++ foreach
idStr::(V)Format() is a static (v)printf-like function that returns and idStr. Can be used like a better va(), or for idStr mystr = idStr::Format( "number of items: %d", myarr.Num() );
Configuration menu - View commit details
-
Copy full SHA for 7023475 - Browse repository at this point
Copy the full SHA 7023475View commit details -
Dhewm3SettingsMenu: some more joystick settings, stub of a binding menu
I actually did this before the prototyping of a keybindings menu in the imgui example code, so the prototype is actually based on this. I'll merge the code from the prototype back once it's done.
Configuration menu - View commit details
-
Copy full SHA for 9e4fe84 - Browse repository at this point
Copy the full SHA 9e4fe84View commit details -
Workaround for missing " or " string in Doom3 demo for Windows
The original binding menu uses #str_07183 between keys - this should be " or ", but in the windows demo that entry is missing in strings/english.lang
Configuration menu - View commit details
-
Copy full SHA for 809bbfc - Browse repository at this point
Copy the full SHA 809bbfcView commit details -
Dhewm3SettingsMenu: Get rid of obscureBindingEntries list
they're part of the regular list now. this will help with the actual binding implementation I'll merge next
Configuration menu - View commit details
-
Copy full SHA for 8554487 - Browse repository at this point
Copy the full SHA 8554487View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d508ea - Browse repository at this point
Copy the full SHA 6d508eaView commit details
Commits on May 23, 2024
-
Add keybinding menu to Dhewm3SettingsMenu
I first developed that as a prototype in https://github.com/DanielGibson/dhewm3/blob/imgui/neo/libs/imgui/examples/example_sdl2_opengl2/main.cpp there one can also find a commit history from writing that code, even though not all commit messages are overly helpful :-p
Configuration menu - View commit details
-
Copy full SHA for 2892e41 - Browse repository at this point
Copy the full SHA 2892e41View commit details -
Bind F10 to open dhewm3Settings menu, unless F10 is already bound
Also fix MSVC build: For some reason Microsoft's sad excuse of a compiler only sets __cplusplus to a value from this millenium if the /Zc:__cplusplus compiler option is set, but that's only supported from VS2017 15.7 on. The alternative is to use _MSVC_LANG, which always holds the version that __cplusplus *should* have...
Configuration menu - View commit details
-
Copy full SHA for ef529cf - Browse repository at this point
Copy the full SHA ef529cfView commit details
Commits on May 24, 2024
-
You can pry X macros from my cold dead hands
Configuration menu - View commit details
-
Copy full SHA for 2e8cbc1 - Browse repository at this point
Copy the full SHA 2e8cbc1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5390653 - Browse repository at this point
Copy the full SHA 5390653View commit details
Commits on May 25, 2024
-
sys_imgui.cpp: Move code to read/write style to imgui_savestyle.cpp
it's nicely self-contained, I'll release it as a mini-library/addon for Dear ImGui on https://github.com/DanielGibson/Snippets/
Configuration menu - View commit details
-
Copy full SHA for bb0511a - Browse repository at this point
Copy the full SHA bb0511aView commit details -
Configuration menu - View commit details
-
Copy full SHA for fd36e8e - Browse repository at this point
Copy the full SHA fd36e8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 99b65a3 - Browse repository at this point
Copy the full SHA 99b65a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 894aa67 - Browse repository at this point
Copy the full SHA 894aa67View commit details -
imgui_savestyle.cpp - some improvements
- write code uses fewer/shorter string literals - code generated by WriteImGuiStyleToCode() has nicer alignment - small improvements in some comments
Configuration menu - View commit details
-
Copy full SHA for 2a7683e - Browse repository at this point
Copy the full SHA 2a7683eView commit details
Commits on May 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c0b6660 - Browse repository at this point
Copy the full SHA c0b6660View commit details
Commits on May 28, 2024
-
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.
Configuration menu - View commit details
-
Copy full SHA for 4bdee4f - Browse repository at this point
Copy the full SHA 4bdee4fView commit details -
* Binding menu makes sure that the AllBindingsMenu always gets focus when opened * Give binding-related popups slightly rounder edges * Move Game Options tab behind Video and Audio Options * Make warning overlays a bit less translucent
Configuration menu - View commit details
-
Copy full SHA for 7af7508 - Browse repository at this point
Copy the full SHA 7af7508View commit details
Commits on May 29, 2024
-
ImGui: Draw ImGui cursor on black bars in main menu; tweak some colors
In the main menu the ImGui/SDL/System cursor was only drawn when it was over an ImGui window, so only the Doom3 cursor is shown when outside of ImGui windows. The only problem with this is that the Doom3 cursor is only shown in the parst of the window actually covered by the main menu, not the black bars that are drawn on the left/right for widescreen-resolutions when scaling the menu to 4:3 is enabled (which it is by default). So now the ImGui cursor is also drawn when the cursor is on those black bars (if any). Also tweaked the windowtitle background colors a bit.
Configuration menu - View commit details
-
Copy full SHA for 1697831 - Browse repository at this point
Copy the full SHA 1697831View commit details
Commits on May 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0e34117 - Browse repository at this point
Copy the full SHA 0e34117View commit details -
Configuration menu - View commit details
-
Copy full SHA for 139020f - Browse repository at this point
Copy the full SHA 139020fView commit details -
Allow changing r_swapInterval (VSync) on-the-fly
Not supported with SDL1.2 - but that's only still supported by dhewm3 because I'm too lazy to rip it out :-p
Configuration menu - View commit details
-
Copy full SHA for e3d67f0 - Browse repository at this point
Copy the full SHA e3d67f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2aaaeb1 - Browse repository at this point
Copy the full SHA 2aaaeb1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 410d279 - Browse repository at this point
Copy the full SHA 410d279View commit details -
Add optional "nores" argument to Com_ExecMachineSpec_f()
if set, the display resolution (r_mode) is not modified
Configuration menu - View commit details
-
Copy full SHA for fcbc757 - Browse repository at this point
Copy the full SHA fcbc757View commit details -
Configuration menu - View commit details
-
Copy full SHA for 337b339 - Browse repository at this point
Copy the full SHA 337b339View commit details
Commits on May 31, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7b6fdc8 - Browse repository at this point
Copy the full SHA 7b6fdc8View commit details
Commits on Jun 1, 2024
-
- s_scaleDownAndClamp CVar so the clamping and scaling down of all sounds (that is done to prevent clipping) can be disabled (enabled by default) - s_alOutputLimiter CVar to allow configuring ALC_SOFT_output_limiter which (if enabled) reduces the overall volume if it gets too loud, to avoid clipping (defaults to -1 = "let OpenAL decide") - s_alHRTF to allow enabling or disabling HRTF, requires ALC_SOFT_HRTF (defaults to -1 = "let OpenAL decide") Those CVars can be changed at runtime and are applied immediately (in case of s_alHRTF and s_alOutputLimiter by resetting the OpenAL device, just like we do when a disconnect is detected)
Configuration menu - View commit details
-
Copy full SHA for 2c58845 - Browse repository at this point
Copy the full SHA 2c58845View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd22f55 - Browse repository at this point
Copy the full SHA bd22f55View commit details
Commits on Jun 2, 2024
-
New input CVars: in_allowAlwaysRunInSP, m_invertLook
in_allowAlwaysRunInSP allows using in_alwaysRun and in_toggleRun in Single Player (it'll still drain your stamina!) m_invertLook allows inverting mouse look, both for up/down and left/right, if you're into that kind of thing
Configuration menu - View commit details
-
Copy full SHA for 50d7129 - Browse repository at this point
Copy the full SHA 50d7129View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30e4a9b - Browse repository at this point
Copy the full SHA 30e4a9bView commit details -
Add some functions to handle UTF-8 strings
- convert to/from ISO8859-1 (Doom3's "High ASCII" encoding) - count Unicode codepoints in UTF-8 string - cut UTF-8 string off after N codepoints - use the conversion function to replace iconv in sys/events.cpp
Configuration menu - View commit details
-
Copy full SHA for 6dc36c6 - Browse repository at this point
Copy the full SHA 6dc36c6View commit details -
Dhewm3SettingsMenu: properly handle playername encoding and length
ImGui uses UTF-8 for strings, Doom3 uses ISO8859-1, so the playername must be translated. Also it seems like the playername should have at least 40 chars, at least that's the limit imposed by the original Doom3 menu
Configuration menu - View commit details
-
Copy full SHA for ecee402 - Browse repository at this point
Copy the full SHA ecee402View commit details -
Allow disabling Dear ImGui integration in CMake
and do it automatically when using SDL1.2, as it requires SDL2 (or SDL3 once we support it)
Configuration menu - View commit details
-
Copy full SHA for 10312f6 - Browse repository at this point
Copy the full SHA 10312f6View commit details -
Dhewm3SettingsMenu: Save number of BindingColumns in a CVar
so it gets saved in the config also added another Game Option and added separators to that menu
Configuration menu - View commit details
-
Copy full SHA for 67a0dc8 - Browse repository at this point
Copy the full SHA 67a0dc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f62e9a - Browse repository at this point
Copy the full SHA 7f62e9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for cb5d988 - Browse repository at this point
Copy the full SHA cb5d988View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7aa6c6a - Browse repository at this point
Copy the full SHA 7aa6c6aView commit details
Commits on Jun 3, 2024
-
Fix ImGui with r_fillWindowAlphaChan
turns out ImGui also messes with the windows alpha chan, so, it must render before the alpha chan is filled
Configuration menu - View commit details
-
Copy full SHA for 28d81ed - Browse repository at this point
Copy the full SHA 28d81edView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5376c6d - Browse repository at this point
Copy the full SHA 5376c6dView commit details -
for some reason <algorithm> dragged in <cstdio> which chocked on the use_idStr_snPrintf #defines from Str.h "fixed" by including <algorithm> first also shut up some compiler warnings about signed/unsigned mismatch
Configuration menu - View commit details
-
Copy full SHA for a9bee9f - Browse repository at this point
Copy the full SHA a9bee9fView commit details -
Replace zlib with integrated miniz
using amalgamated miniz 3.0.2 from https://github.com/richgel999/miniz and minizconf.h from Yamagi Quake II: https://github.com/yquake2/yquake2/blob/master/src/common/unzip/miniz/minizconf.h
Configuration menu - View commit details
-
Copy full SHA for 1b344d4 - Browse repository at this point
Copy the full SHA 1b344d4View commit details
Commits on Jun 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c317e60 - Browse repository at this point
Copy the full SHA c317e60View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81d912a - Browse repository at this point
Copy the full SHA 81d912aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 51270dd - Browse repository at this point
Copy the full SHA 51270ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for ab5d590 - Browse repository at this point
Copy the full SHA ab5d590View commit details
Commits on Jun 5, 2024
-
ImGui: Apply patch from upstream that fixes tooltips of disabled buttons
Upstream commit: "Disabled: nested tooltips or other non-child window within a BeginDisabled() block disable the disabled state. (dhewm#211, #7640)" Should be in the next Dear ImGui release
Configuration menu - View commit details
-
Copy full SHA for af34aba - Browse repository at this point
Copy the full SHA af34abaView commit details -
Always optimize code of some integrated libraries, even in Debug builds
the stb libs, miniz and minizip are now always optimized to speed up performance, esp. level loading times, in debug builds. So far the stb libs implementation were dragged into the source file that uses them, now I created additional source files just for them so those can be optimized while the engine source files using those libs can remain unoptimized in debug builds.
Configuration menu - View commit details
-
Copy full SHA for e8b8f5c - Browse repository at this point
Copy the full SHA e8b8f5cView commit details
Commits on Jun 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 863dc48 - Browse repository at this point
Copy the full SHA 863dc48View commit details -
Adjust imgui_savestyle.cpp for 1.90.8
ImGuiDir now is a proper enum, not just a typedef of int that happens to have a similar name to the actual enum
Configuration menu - View commit details
-
Copy full SHA for 49ed8ec - Browse repository at this point
Copy the full SHA 49ed8ecView commit details
Commits on Jun 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for cff73ff - Browse repository at this point
Copy the full SHA cff73ffView commit details -
Fix crash in Dhewm3SettingsMenu after switching fullscreen w/ Alt-Enter
Seems like calling ImGui::CalcTextSize() is only safe after (or at the end of) NewFrame()
Configuration menu - View commit details
-
Copy full SHA for 28b753d - Browse repository at this point
Copy the full SHA 28b753dView commit details -
Make dhewm3 window resizable (when using SDL2)
is this really all that's needed?!
Configuration menu - View commit details
-
Copy full SHA for ab67687 - Browse repository at this point
Copy the full SHA ab67687View commit details
Commits on Jun 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a6870ca - Browse repository at this point
Copy the full SHA a6870caView commit details -
Add r_windowResizable to configure if window is resizable
incl. setting in SettingsMenu With SDL 2.0.5 and newer this change is applied immediately, 2.0.0 to 2.0.4 need a vid_restart (with SDL1.2 we don't support it at all)
Configuration menu - View commit details
-
Copy full SHA for ac8eec9 - Browse repository at this point
Copy the full SHA ac8eec9View commit details
Commits on Jun 11, 2024
-
Implement GLimp_SetScreenParms() for "vid_restart partial"
"vid_restart partial" only changes the window size or its fullscreen (or windowed) state, without recreating everything. If that fails (or antialiasing settings have changed), it will fall back to a full vid_restart (this behavior is different than original "vid_restart partial" that probably was implemented in Vanilla Doom3 but not dhewm3) This is used for Alt-Enter (which toggles between fullscreen and windowed state) and when pressing the Apply button in the new Video Menu
Configuration menu - View commit details
-
Copy full SHA for 44d19a4 - Browse repository at this point
Copy the full SHA 44d19a4View commit details -
Fix toggling fullscreen mode with vid_restart partial, esp for Alt-Enter
Toggling with Alt-Enter relies on idRenderSystem::IsFullScreen() which returns glConfig.isFullscreen That can only work if GLimp_SetScreenParms() actually sets glConfig.isFullscreen Thanks j4reporting for reporting this! :)
Configuration menu - View commit details
-
Copy full SHA for c096a86 - Browse repository at this point
Copy the full SHA c096a86View commit details -
Configuration menu - View commit details
-
Copy full SHA for 387430a - Browse repository at this point
Copy the full SHA 387430aView commit details
Commits on Jun 12, 2024
-
Add glimpParms_t GLimp_GetCurState() to get current window state
it's queried from SDL so it should be up-to-date. Using it in GLimp_SetScreenParms(), as it mostly did the same SDL calls to get the current state for the partial vid_restart
Configuration menu - View commit details
-
Copy full SHA for 94738f1 - Browse repository at this point
Copy the full SHA 94738f1View commit details -
Dhewm3SettingsMenu: Rework resolution/windowed/MSAA part of Video Opt…
…ions Now the CVars are set immediately and "Apply" only does `vid_restart partial`, while "Reset" resets the CVars to the values that were set when opening the menu. This also works the other way around: Changing a CVar (in the console or other menu or r_fullscreen with Alt-Enter) is immediately reflected in the menu. Furthermore, "fullscreen desktop" now is its own setting (=> can be set even if windowed mode is selected), to accommodate switchting between windowed and fullscreen with Alt-Enter
Configuration menu - View commit details
-
Copy full SHA for 9eff1d9 - Browse repository at this point
Copy the full SHA 9eff1d9View commit details