From aa52caba97fc24b73bab76d1cbaa0b437963a634 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:14:58 -0500 Subject: [PATCH] imgui 1.90.6 -> 1.91.6 --- cmake/dependencies/common.cmake | 2 +- src/window/gui/ConsoleWindow.cpp | 6 +++--- src/window/gui/Gui.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmake/dependencies/common.cmake b/cmake/dependencies/common.cmake index 6d53277c4..7ba64a7b0 100644 --- a/cmake/dependencies/common.cmake +++ b/cmake/dependencies/common.cmake @@ -16,7 +16,7 @@ set(sdl_apply_patch_if_needed git apply ${sdl_gamepad_patch_file} ${git_hide_out FetchContent_Declare( ImGui GIT_REPOSITORY https://github.com/ocornut/imgui.git - GIT_TAG v1.90.6-docking + GIT_TAG v1.91.6-docking PATCH_COMMAND ${sdl_apply_patch_if_needed} ) FetchContent_MakeAvailable(ImGui) diff --git a/src/window/gui/ConsoleWindow.cpp b/src/window/gui/ConsoleWindow.cpp index f76055083..b96a0f9c4 100644 --- a/src/window/gui/ConsoleWindow.cpp +++ b/src/window/gui/ConsoleWindow.cpp @@ -387,12 +387,12 @@ void ConsoleWindow::DrawElement() { ImGui::PushStyleColor(ImGuiCol_FrameBgActive, ImVec4(.3f, .3f, .3f, 1.0f)); if (ImGui::BeginTable("History", 1)) { - if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) { + if (ImGui::IsKeyPressed(ImGuiKey_DownArrow)) { if (mSelectedId < (int32_t)mLog.size() - 1) { ++mSelectedId; } } - if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) { + if (ImGui::IsKeyPressed(ImGuiKey_UpArrow)) { if (mSelectedId > 0) { --mSelectedId; } @@ -415,7 +415,7 @@ void ConsoleWindow::DrawElement() { std::find(mSelectedEntries.begin(), mSelectedEntries.end(), i) != mSelectedEntries.end(); ImGui::PushStyleColor(ImGuiCol_Text, mPriorityColours[line.Priority]); if (ImGui::Selectable(id.c_str(), isSelected)) { - if (ImGui::IsKeyDown(ImGui::GetKeyIndex(ImGuiKey_LeftCtrl)) && !isSelected) { + if (ImGui::IsKeyDown(ImGuiKey_LeftCtrl) && !isSelected) { mSelectedEntries.push_back(i); } else { diff --git a/src/window/gui/Gui.cpp b/src/window/gui/Gui.cpp index 3291b4951..39c7aaaa0 100644 --- a/src/window/gui/Gui.cpp +++ b/src/window/gui/Gui.cpp @@ -626,7 +626,7 @@ void Gui::DrawGame() { } if (gfxFramebuffer) { ImGui::SetCursorPos(pos); - ImGui::Image(reinterpret_cast(gfxFramebuffer), size); + ImGui::Image((ImTextureID)gfxFramebuffer, size); } ImGui::End(); @@ -706,7 +706,7 @@ ImTextureID Gui::GetTextureById(int32_t id) { } #endif - return reinterpret_cast(id); + return (ImTextureID)id; } bool Gui::HasTextureByName(const std::string& name) { @@ -715,7 +715,7 @@ bool Gui::HasTextureByName(const std::string& name) { ImTextureID Gui::GetTextureByName(const std::string& name) { if (!Gui::HasTextureByName(name)) { - return nullptr; + return (ImTextureID)nullptr; } return GetTextureById(mGuiTextures[name].RendererTextureId); }