From 5324d0a244bfa6094e71867d5fe758fc0fb4597b Mon Sep 17 00:00:00 2001 From: Andreas Maerten <24669514+Yimura@users.noreply.github.com> Date: Thu, 21 Dec 2023 16:01:47 +0100 Subject: [PATCH] feat(cmake): update ImGui to latest release (#2621) --- scripts/imgui.cmake | 2 +- src/lua/bindings/imgui.hpp | 7 +------ src/widgets/imgui_hotkey.hpp | 3 +-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/imgui.cmake b/scripts/imgui.cmake index 60523b07..23d40cf9 100644 --- a/scripts/imgui.cmake +++ b/scripts/imgui.cmake @@ -2,7 +2,7 @@ include(FetchContent) FetchContent_Declare( imgui GIT_REPOSITORY https://github.com/ocornut/imgui.git - GIT_TAG 94c46d74869ec991c101c187088da0f25d6c8e40 + GIT_TAG v1.90 GIT_PROGRESS TRUE ) message("ImGui") diff --git a/src/lua/bindings/imgui.hpp b/src/lua/bindings/imgui.hpp index c0f8359b..92cb52b2 100644 --- a/src/lua/bindings/imgui.hpp +++ b/src/lua/bindings/imgui.hpp @@ -231,10 +231,6 @@ namespace lua::imgui const auto vec2{ImGui::GetWindowContentRegionMax()}; return std::make_tuple(vec2.x, vec2.y); } - inline float GetWindowContentRegionWidth() - { - return ImGui::GetWindowContentRegionWidth(); - } // Windows Scrolling inline float GetScrollX() @@ -3242,7 +3238,7 @@ namespace lua::imgui #pragma endregion MouseButton #pragma region ImDrawCorner Flags - luaGlobals.new_enum("ImDrawCornerFlags", "None", ImDrawCornerFlags_None, "TopLeft", ImDrawCornerFlags_TopLeft, "TopRight", ImDrawCornerFlags_TopRight, "BotLeft", ImDrawCornerFlags_BotLeft, "BotRight", ImDrawCornerFlags_BotRight, "Top", ImDrawCornerFlags_Top, "Bot", ImDrawCornerFlags_Bot, "Left", ImDrawCornerFlags_Left, "Right", ImDrawCornerFlags_Right, "All", ImDrawCornerFlags_All); + luaGlobals.new_enum("ImDrawCornerFlags", "None", ImDrawFlags_RoundCornersNone, "TopLeft", ImDrawFlags_RoundCornersTopLeft, "TopRight", ImDrawFlags_RoundCornersTopRight, "BotLeft", ImDrawFlags_RoundCornersBottomLeft, "BotRight", ImDrawFlags_RoundCornersBottomRight, "Top", ImDrawFlags_RoundCornersTop, "Bot", ImDrawFlags_RoundCornersBottom, "Left", ImDrawFlags_RoundCornersLeft, "Right", ImDrawFlags_RoundCornersRight, "All", ImDrawFlags_RoundCornersAll); #pragma endregion ImDrawCorner Flags } @@ -3294,7 +3290,6 @@ namespace lua::imgui ImGui.set_function("GetContentRegionAvail", GetContentRegionAvail); ImGui.set_function("GetWindowContentRegionMin", GetWindowContentRegionMin); ImGui.set_function("GetWindowContentRegionMax", GetWindowContentRegionMax); - ImGui.set_function("GetWindowContentRegionWidth", GetWindowContentRegionWidth); #pragma endregion Content Region #pragma region Windows Scrolling diff --git a/src/widgets/imgui_hotkey.hpp b/src/widgets/imgui_hotkey.hpp index e4523fce..c57b366b 100644 --- a/src/widgets/imgui_hotkey.hpp +++ b/src/widgets/imgui_hotkey.hpp @@ -31,8 +31,7 @@ namespace ImGui //const bool focus_requested = ImGui::FocusableItemRegister(window, g.ActiveId == id, false); //const bool focus_requested_by_code = focus_requested && (window->FocusIdxAllCounter == window->FocusIdxAllRequestCurrent); - const bool hovered = ImGui::ItemHoverable(frame_bb, id); - + const bool hovered = ImGui::ItemHoverable(frame_bb, id, ImGuiItemFlags_None); if (hovered) { ImGui::SetHoveredID(id);