github ppy/osu-framework 2020.122.0

latest releases: 2024.528.1, 2024.528.0, 2024.523.0...
4 years ago

Thanks for following along! This is a tagged release (2020.122.0). For more information check out the osu! changelog page and dev blog.

Breaking Changes

InputManager.CreateButtonManagerFor was renamed to InputManager.CreateButtonEventManagerFor

Changed to match other methods and the class name it was creating.

Various input "end" events now return void and can no longer block propagation

Events affected:

Drawable.OnDoubleClick()
Drawable.OnDrag()
Drawable.OnDragEnd()
Drawable.OnMouseUp()
Drawable.OnKeyUp()
Drawable.OnJoystickRelease()
IKeyBindingHandler<T>.OnReleased()

A drawable may return false for an input "begin" event to allow the event to propagate further through the hierarchy. Previously, such a drawable could then return true for the input "end" event and prevent the event from propagating to the drawables which the input "begin" event was propagated to.
This could lead to incorrect implementations where drawables are left in weird states after handling input events.

By returning void, the input "end" events can no longer be blocked by other drawables in the hierarchy and are guaranteed to be invoked if their respective input "begin" event was previously invoked.

The following table illustrates the events for which the relationship is satisfied:

begin event end event(s)
OnDragStart() OnDrag(), OnDragEnd()
OnMouseDown() OnMouseUp()
OnKeyDown() OnKeyUp()
OnJoystickPress() OnJoystickRelease()
OnPressed() OnReleased()

Don't miss a new osu-framework release

NewReleases is sending notifications on new releases.