Quick preview of changes:
- Input layouts are a bit heavier handed now and don’t customize the name as much, which prevents many beginner errors
- The main stick is now separate from stick, because it has much more assumption built in for motion and the like.
- Multiple type inputs are a bit more generic and can be derived, or depend on derived inputs.
- Derived inputs have been split into the new input events system, which enables a bunch of stuff. (No derived inputs yet as the main ones rely on physics)
- Input events now replace the Press/Release thing, any input can have input events and they linger for a bit until explicitely consumed. This makes input much cleaner and reliable. It’s more KOF style, which is think is the best implementation.
- Some extra events like DoublePress, or motion inputs, can be added in the future
- Interface supports multiple inputs per frame, although I’m not sure I want to keep this? food for thought.
The syntax is a bit different, check this:
# Assuming L is a button
IL: # Is L currently held down ?
IL.Press: # Is an L press buffered ?
# The buffer lasts around 8f at the moment, and is unbuffered if released
# If going into this branch, the event is consumed.
IL.Press?: # Same as previous, but doesn't consume the press.