From dbbe0afb0d2055f2b8ccf9ab77d8a908e02f0ac3 Mon Sep 17 00:00:00 2001 From: wootguy Date: Tue, 23 Apr 2024 21:00:53 -0700 Subject: [PATCH] update ImGui to 1.90.5 --- CMakeLists.txt | 2 +- imgui | 2 +- src/editor/Gui.cpp | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cea7e9be..62415ac8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,7 +199,7 @@ if(MSVC) src/util/lodepng.cpp) else() - target_link_libraries(${PROJECT_NAME} GL GLU X11 Xxf86vm Xrandr pthread Xi GLEW stdc++fs) + target_link_libraries(${PROJECT_NAME} GL GLU X11 Xxf86vm Xrandr pthread Xi GLEW stdc++fs ${CMAKE_DL_LIBS}) set(CMAKE_CXX_FLAGS "-Wall -std=c++11") set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") set(CMAKE_CXX_FLAGS_RELEASE "-Os -fno-exceptions -w -Wfatal-errors") diff --git a/imgui b/imgui index 4df57136..231cbee0 160000 --- a/imgui +++ b/imgui @@ -1 +1 @@ -Subproject commit 4df57136e9832327c11e48b5bfe00b0326bd5b63 +Subproject commit 231cbee0fc4f59dbe5b8b853a11b08dc84e57c65 diff --git a/src/editor/Gui.cpp b/src/editor/Gui.cpp index a2f1689c..7af0b53a 100644 --- a/src/editor/Gui.cpp +++ b/src/editor/Gui.cpp @@ -3283,7 +3283,8 @@ void Gui::drawEntityReport() { static vector visibleEnts; static vector selectedItems; - const ImGuiKeyModFlags expected_key_mod_flags = ImGui::GetMergedKeyModFlags(); + ImGuiIO& io = ImGui::GetIO(); + const ImGuiModFlags expected_key_mod_flags = io.KeyMods; int footerHeight = ImGui::GetFrameHeightWithSpacing() * 5 + 16; ImGui::BeginChild("entlist", ImVec2(0, -footerHeight)); @@ -3371,11 +3372,11 @@ void Gui::drawEntityReport() { string cname = ent->keyvalues["classname"]; if (ImGui::Selectable((cname + "##ent" + to_string(i)).c_str(), selectedItems[i], ImGuiSelectableFlags_AllowDoubleClick)) { - if (expected_key_mod_flags & ImGuiKeyModFlags_Ctrl) { + if (expected_key_mod_flags & ImGuiModFlags_Ctrl) { selectedItems[i] = !selectedItems[i]; lastSelect = i; } - else if (expected_key_mod_flags & ImGuiKeyModFlags_Shift) { + else if (expected_key_mod_flags & ImGuiModFlags_Shift) { if (lastSelect >= 0) { int begin = i > lastSelect ? lastSelect : i; int end = i > lastSelect ? i : lastSelect;