Thanks for following along! This is a tagged release (2021.916.1).
Breaking changes
IKeyBindingHandler<T>
and IScrollBindingHandler<T>
now provide UIEvent
s
To allow for more arguments without changing the signature of the handling methods, and also for consistency with the input flow in general, both interfaces now provide UIEvent
s rather than placing each parameter directly on the methods.
- public bool OnPressed(T action) { }
- public bool OnScroll(T action, float amount, bool isPrecise) { }
- public void OnReleased(T action) { }
+ public bool OnPressed(KeyBindingPressEvent<T> e) { }
+ public bool OnScroll(KeyBindingScrollEvent<T> e) { }
+ public void OnReleased(KeyBindingReleaseEvent<T> e) { }
The following regex replacements can be used to simplify migration:
Find: bool OnPressed\((\w+)\s+(\w+)\)
Replace: bool OnPressed(KeyBindingPressEvent<$1> e)
Find: void OnReleased\((\w+)\s+(\w+)\)
Replace: void OnReleased(KeyBindingReleaseEvent<$1> e)
Find: bool OnScroll\((\w+) (\w+), float \w+, bool \w+\)
Replace: bool OnScroll(KeyBindingScrollEvent<$1> e)