From cae1223fb59f41a5c94801c6ac9ece59dea65423 Mon Sep 17 00:00:00 2001 From: GwWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Mon, 22 Dec 2025 19:50:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(input):=20=E6=89=A9=E5=B1=95=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E9=98=B6=E6=AE=B5=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增对 Capture 阶段输入事件的支持,不再仅限于 Bubble 阶段处理输入。 此更改允许在拖拽等场景中,在 Capture 阶段也能正确处理输入事件, 提升输入处理的灵活性和准确性。 --- GFramework.Godot/input/GodotInputTranslator.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GFramework.Godot/input/GodotInputTranslator.cs b/GFramework.Godot/input/GodotInputTranslator.cs index 9ac1ba9..3144bbe 100644 --- a/GFramework.Godot/input/GodotInputTranslator.cs +++ b/GFramework.Godot/input/GodotInputTranslator.cs @@ -23,8 +23,9 @@ public sealed class GodotInputTranslator : IInputTranslator var evt = raw.Event; - // 示例规则:只在 Bubble 阶段生成游戏输入 - if (raw.Phase != GodotInputPhase.Bubble) + // 支持多个输入阶段:Capture, Bubble, 和其他阶段 + // 在拖拽过程中,可能需要在Capture阶段也处理输入 + if (raw.Phase != GodotInputPhase.Bubble && raw.Phase != GodotInputPhase.Capture) return false; // Action