mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-23 11:14:30 +08:00
feat(input): 扩展输入阶段支持
新增对 Capture 阶段输入事件的支持,不再仅限于 Bubble 阶段处理输入。 此更改允许在拖拽等场景中,在 Capture 阶段也能正确处理输入事件, 提升输入处理的灵活性和准确性。
This commit is contained in:
parent
e39f32d9a8
commit
c3224d8469
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user