github ppy/osu-framework 2021.1029.0

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

Thanks for following along! This is a tagged release (2021.1029.0).

Breaking Changes

TextFlowContainer no longer returns raw SpriteTexts, returning ITextParts instead

In preparation for adding localisation support to TextFlowContainers, the various AddText()/AddLine() overloads will no longer return raw SpriteTexts. Instead, an ITextPart structure will be returned.

Via ITextPart, the consumer can both access all Drawables associated with a given piece of text, as well as react to any future changes in representation of the text by subscribing to DrawablePartsRecreated. In the future, with more localisation changes, this event will be invoked once a LocalisableString's displayable content changes, which will trigger a recreation of all parts' drawables, upon which any manual adjustments applied to Drawables can be re-applied again.

For consumers wanting to implement their own ITextParts to extend the functionality of TextFlowContainer, an abstract TextPart is also provided which implements the typical flow of handling Drawables and DrawablePartsRecreated. The only thing that a consumer has to do when inheriting that class is to implement CreateDrawablesFor(TextFlowContainer).

What's Changed

  • Update var usage inspections to disallow for built-in types by @peppy in #4846
  • Apply "use explicit type (built-in types)" inspection fix by @ekrctb in #4847
  • Update nvika by @smoogipoo in #4848
  • Add support for hardware video decoding by @Opelkuh in #4839
  • Restructure TextFlowContainer to be backed by collection of ITextParts by @bdach in #4703

Full Changelog: 2021.1026.0...2021.1029.0

Don't miss a new osu-framework release

NewReleases is sending notifications on new releases.