From dd5df3a1f218a25a3f23b0bf13187a03ed228a2b Mon Sep 17 00:00:00 2001 From: Ryoshi <86336951+NGLSG@users.noreply.github.com> Date: Mon, 8 Sep 2025 12:51:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9imgui=201.9.*?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- imgui_node_editor.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/imgui_node_editor.cpp b/imgui_node_editor.cpp index 1d2bb060..9d902d2b 100644 --- a/imgui_node_editor.cpp +++ b/imgui_node_editor.cpp @@ -166,6 +166,16 @@ void ed::Log(const char* fmt, ...) # endif } +namespace ImGui +{ + ImGuiKey GetKeyIndex(ImGuiKey key) + { + ImGuiContext& g = *GImGui; + IM_ASSERT(IsNamedKey(key)); + const ImGuiKeyData* key_data = GetKeyData(key); + return (ImGuiKey)(key_data - g.IO.KeysData); + } +} //------------------------------------------------------------------------------ static bool IsGroup(const ed::Node* node)