ktx v1.9.8-b1 Release Notes
Release Date: 2018-01-27 // over 6 years ago-
🚀 The first release that contains
ktx-freetype
andktx-freetype-async
modules: FreeType font loading utilities. The transition from Kotlin 1.1 to 1.2 also allowed us to use default functional parameters in inlined methods, which simplified some APIs. It also contains notable changes and simplifications of thektx-inject
API.
- ⚡️ [UPDATE] Updated to LibGDX 1.9.8.
- ⚡️ [UPDATE] Updated to Kotlin 1.2.21.
- ⚡️ [UPDATE] Updated to Kotlin Coroutines 0.22.
- ⚡️ [UPDATE] Updated to Gradle 4.4.
- ⚡️ [UPDATE] Updated to VisUI 1.4.0.
- [CHANGE] (
ktx-scene2d
) Duplicate functions in Scene2D building DSL were removed thanks to optional default lambda parameters in inlined functions (added in Kotlin 1.2). Due to the limitation in inlined methods, there used to be two inlined methods for each actor to support syntax both with braces (init block) and without. Now there is just one factory method supporting both syntax variants per widget. This should not affect most application, but might require
Kotlin 1.2 usage. - [CHANGE] (
ktx-ashley
) Default functional parameters were added tocreate
,entity
andwith
, simplifying the implementation and making configuration blocks optional. - [CHANGE] (
ktx-inject
) Parameters ofbindSingleton
consuming multiple classes have been swapped to be more compatible with thebind
functions. - [CHANGE] (
ktx-inject
)bind
andbindSingleton
methods consuming multiple classes now takeKClass
as parameters instead ofClass
, so now you can useYourType::class
instead of more verboseYourType::class.java
. - [FEATURE] (
ktx-style
) Initiation blocks ofSkin
and Scene2D actor styles are now optional. - [FEATURE] (
ktx-vis-style
) Initiation blocks of VisUI actor styles are now optional. - [FEATURE] (
ktx-box2d
) Initiation blocks of fixtures and joints are now optional thanks to default lambda parameters in inlined functions. [FEATURE] (
ktx-inject
) Add higher-order function parameters forbindSingleton
to allow the use of lambda expressions.fun createCircle(body: Body) { // Before - would not compile without additional braces: body.circle(radius = 2f) {} // Now - braces are optional (lambda parameter defaults to no-op): body.circle(radius = 2f) }
[FEATURE] (
ktx-freetype
) Implementedktx-freetype
module.AssetManager.registerFreeTypeFontLoaders
allows to register all loaders necessary to handle FreeType font assets.AssetManager.loadFreeTypeFont
provides Kotlin DSL for loading of FreeType fonts.freeTypeFontParameters
function provides Kotlin DSL for building FreeType font loading parameters.FreeTypeFontGenerator.generateFont
extension function allows to generateBitmapFont
with Kotlin DSL.
[FEATURE] (
ktx-freetype-async
) Implementedktx-freetype-async
module.AssetStorage.registerFreeTypeFontLoaders
allows to register all loaders necessary to handle FreeType font assets.AssetStorage.loadFreeTypeFont
provides Kotlin DSL for asynchronous loading of FreeType fonts.
[FIX] (
ktx-box2d
) As LibGDX 1.9.8 fixes itsChainShape
implementation,ChainShape
utilities are supported once again.