All Versions
43
Latest Version
Avg Release Cycle
56 days
Latest Release
-
Changelog History
Page 1
Changelog History
Page 1
-
v1.11.0-rc2 Changes
- ⚡️ [UPDATE] Updated to Kotlin 1.7.10.
- ⚡️ [UPDATE] Updated to Kotlin Coroutines 1.6.4.
- ⚡️ [UPDATE] Updated to Dokka 1.7.10.
- [MISC] New Dokka theme is available on the documentation website.
- [FEATURE] (
ktx-actors
) AddedActor.onEnter
,Actor.onExit
,Actor.onEnterEvent
andActor.onExitEvent
extension methods that attachClickListener
instances listening for enter and exit events. - [FEATURE] (
ktx-ashley
) AddedComponentDelegate
andOptionalComponentDelegate
that allow accessing component viaEntity
extension properties. - [FEATURE] (
ktx-ashley
) AddedpropertyFor<Component>
andoptionalPropertyFor<Component>
utility functions that automatically create a mapper for the component delegates.
-
v1.11.0-rc1 Changes
- ⚡️ [UPDATE] Updated to libGDX 1.11.0.
- [MISC] Gradle dependencies changed from compile-only to API scope.
- [FEATURE] (
ktx-app
) AddedgdxError
utility that throws aGdxRuntimeException
. - [FIX] (
ktx-assets-async
) Fixed a niche bug withAsyncAssetManager
which could lead to missed callbacks after attempting to load the same asset concurrently withloadAsync
.
-
v1.10.0-rc2 Changes
- ⚡️ [UPDATE] Updated to Kotlin 1.6.21.
- ⚡️ [UPDATE] Updated to Kotlin Coroutines 1.6.1.
- [FEATURE] (
ktx-ashley
) Added utilities for working with Ashley'sEntityListener
interface:EntityAdditionListener
: an interface extendingEntityListener
that only requires implementation of theentityAdded
method.EntityRemovalListener
: an interface extendingEntityListener
that only requires implementation of theentityRemoved
method.Engine.onEntityAdded
andEngine.onEntityRemoved
extension methods that create entity listeners from lambdas.- Wrappers for
Engine.onEntityAdded
andEngine.onEntityRemoved
forIteratingSystem
,IntervalIteratingSystem
andSortedIteratingSystem
that use system'sFamily
andEngine
automatically.
- [FEATURE] (
ktx-script
) AddedKotlinScriptEngine.evaluateOn
methods that can execute scripts with a custom receiver. - [CHANGE] (
ktx-script
) Generic libGDX and Java exceptions replaced with a customScriptEngineException
.
-
v1.10.0-rc1 Changes
- ⚡️ [UPDATE] Updated to Kotlin 1.6.10.
- ⚡️ [UPDATE] Updated to Kotlin Coroutines 1.6.0.
- [MISC] Links to the libGDX wiki were updated.
- [MISC] Stable KTX releases are now marked with the
-rc
suffix. - [CHANGE] (
ktx-scene2d
) The genericNode
type ofKTreeWidget
was changed toKNode<*>
. - [FEATURE] Added
Tree.onSelectionChange
extension method that attaches aChangeListener
to aTree
. - [FEATURE] (
ktx-script
) Added a new module withKotlinScriptEngine
evaluating Kotlin scripts in runtime.evaluate(String)
: compiles and executes a script passed as a string.evaluate(FileHandle)
: compiles and executes a script from the selected file.evaluateAs<T>(String)
: compiles and executes a script passed as a string. Casts the result toT
.evaluateAs<T>(FileHandle)
: compiles and executes a script from the selected file. Casts the result toT
.set(String, Any)
: adds a variable to the script execution context.get(String)
: returns the current value assigned to the selected variable.remove(String)
: removes the variable registered under the given name.import(String, String?)
: adds an import to the script context. Accepts optional alias.importAll(vararg String)
,importAll(Iterable<String>)
: adds the selected imports to the script context.setPackage(String)
: sets the package for the scripts.onItemClick(Node)
: adds a listener that gets invoked whenNode
in aTree
gets clicked.
- [CHANGE] (
ktx-vis
) The genericNode
type ofKVisTree
was changed toKNode<*>
.
-
v1.10.0-b4 Changes
- ⚡️ [UPDATE] Updated to Gradle 7.2.
- ⚡️ [UPDATE] Updated to Dokka 1.5.30.
- [FEATURE] (
ktx-app
) AddedPlatform
object that exposes various utilities for platform-specific code.Platform.currentPlatform
returns currentApplicationType
or throwsGdxRuntimeException
if unable to determine.Platform.version
returns the current version of the platform (e.g., Android API version, iOS major OS version).- Boolean properties that allow to determine current platform:
Platform.isAndroid
checks if the current platform is Android.Platform.isDesktop
checks if the current platform is desktop with graphical application.Platform.isHeadless
checks if the current platform is desktop without graphical application.Platform.isiOS
checks if the current platform is iOS.Platform.isMobile
checks if the current platform is Android or iOS.Platform.isWeb
checks if the current platform is HTML/WebGL.- Inlined methods that allow to execute code on specific platforms:
Platform.runOnAndroid
executes an action if the current platform is Android. Returns action result or null.Platform.runOnDesktop
executes an action if the current platform is desktop. Returns action result or null.Platform.runOnHeadless
executes an action if the current platform is headless desktop. Returns action result or null.Platform.runOniOS
executes an action if the current platform is iOS. Returns action result or null.Platform.runOnMobile
executes an action if the current platform is Android or iOS. Returns action result or null.Platform.runOnWeb
executes an action if the current platform is HTML/WebGL. Returns action result or null.- Inlined
runOnVersion
executes an action if the current platform version is within minimum and maximum values.
- [FEATURE] (
ktx-ashley
)Mapper
abstract class designed forcompanion object
s ofComponent
s. 👍 Allows to easily obtain instances of aComponentMapper
corresponding to the enclosingComponent
class. - [FEATURE] (
ktx-assets-async
)AssetStorage.loadSync(String)
now supports optional loading parameters. - [FEATURE] (
ktx-collections
)isEmpty
andisNotEmpty
extension methods of libGDX collections now support Kotlin contracts. If they returntrue
, the collection is implied not to be null. - [CHANGE] (
ktx-collections
) AsIdentityMap
now extendsObjectMap
, some redundant utilities specific to 🚚IdentityMap
were removed. From the user point of view, all additional functionalities are covered by theObjectMap
utilities. - [FEATURE] (
ktx-freetype-async
)AssetStorage.loadFreeTypeFontAsync
was added, mimickingloadAsync
behavior. - [FEATURE] (
ktx-freetype-async
)AssetStorage.loadFreeTypeFontSync
was added, mimickingloadSync
behavior. - [FEATURE] (
ktx-freetype-async
)AsyncAssetManager.loadFreeTypeFontAsync
was added, returning aDeferred<BitmapFont>
instance. - [CHANGE] (
ktx-scene2d
)Scene2DSkin.defaultSkin
now throwsIllegalStateException
when accessed before overriding.
-
v1.10.0-b3 Changes
- ⚡️ [UPDATE] Updated to Kotlin 1.5.31.
- ⚡️ [UPDATE] Updated to Kotlin Coroutines 1.5.2.
- [FEATURE] (
ktx-assets-async
)AssetStorage
now supports loadingPolygonRegion
assets out of the box if the default loaders are registered. - [FEATURE] (
ktx-assets-async
)AsyncAssetManager
is a newAssetManager
extension with basic support for Kotlin coroutines.AsyncAssetManager.loadAsync
allows to schedule an asset for loading, returning aDeferred
asset reference.AsyncAssetManager.getDefaultParameters
allows to create a default instance ofAssetLoaderParameters
for a selected asset.AsyncAssetManager.setLoaderParameterSupplier
has to be called for each custom asset loader in order to enable asynchronous loading without explicitly passing loader parameters.
- [FEATURE] (
ktx-collections
) Factory methods for libGDX arrays of primitives:gdxBooleanArrayOf
gdxByteArrayOf
gdxCharArrayOf
gdxShortArrayOf
gdxIntArrayOf
gdxLongArrayOf
gdxFloatArrayOf
- [FEATURE] (
ktx-inject
) New reflection-basedContext
methods with automatic dependency injection:newInstanceOf
: constructs an instance of the selected class. Injects constructor dependencies from theContext
.bind<Type>
: registers a provider that creates a new instance of selected class via reflection each time it is requested.bindSingleton<Type>
: creates, registers, and returns a singleton of selected class using reflection.
- [FEATURE] (
ktx-reflect
) Added a new module with reflection utilities.Reflection
annotation, which requires opt-in, allows marking functionalities that rely on reflection.ReflectedClass
is an inlined wrapper forClass
that allows to easily use libGDX reflection API.ClassReflection
methods exposed asReflectedClass
read-only properties:simpleName
isMemberClass
isStatic
isArray
isPrimitive
isEnum
isAnnotation
isInterface
isAbstract
componentType
constructors
methods
declaredMethods
fields
declaredFields
annotations
declaredAnnotations
interfaces
enumConstants
ClassReflection
methods exposed asReflectedClass
methods with improved Kotlin class handling:isInstance
isAssignableFrom
newInstance
getConstructor
getDeclaredConstructor
getMethod
getDeclaredMethod
getField
getDeclaredField
isAnnotationPresent
getAnnotation
getDeclaredAnnotation
- Additional
ReflectedClass
utilities:constructor
property allows to extract the only class constructor if it is available.newArrayInstance
method allows to create a type array of the given size usingArrayReflection
.KClass
constructor allows creatingReflectedClass
from aKClass
.
reflect<Type>()
function allows to wrap a selected class withReflectedClass
.reflect(KClass<Type>)
function allows to wrap a selectedKClass
withReflectedClass
.reflect(Class<Type>)
function allows to wrap a selectedClass
withReflectedClass
.reflect(String)
function allows to find a selected class by qualified name and wrap it withReflectedClass
.Annotation.get
extension method with a reified type allowing to get an instance of the annotation.
-
v1.10.0-b2 Changes
- ⚡️ [UPDATE] Updated to Gradle 7.0.2.
- ⚡️ [UPDATE] Updated to Kotlin 1.5.21.
- ⚡️ [UPDATE] Updated to Kotlin Coroutines 1.5.1.
- ⚡️ [UPDATE] Updated to VisUI 1.5.0.
- [CHANGE] The JVM target compatibility of all modules was set to
1.8
, since Java1.6
target was deprecated ✅ and is incompatible with the latest coroutines library. Note that source compatibility level is still set to1.7
. - [FEATURE] (
ktx-assets
) Addeddiscard
lambda parameter to thepool
factory method that is invoked after an object is rejected from the createdPool
. - [FEATURE] (
ktx-scene2d
) Added support forParticleEffectActor
in Scene2D DSL viaparticleEffect
factory method. - [FEATURE] (
ktx-log
) AddedDEBUG
,INFO
andERROR
constants with default logger tags. - [CHANGE] (
ktx-log
) Default tags are no longer wrapped in square brackets. This caused a change of the logs structure. - [CHANGE] (
ktx-log
)Logger.tag
variable was renamed toLogger.name
. - [CHANGE] (
ktx-log
) Log prefix variables fromLogger
were removed. Message tags are now configurable directly through the constructor. - [CHANGE] (
ktx-log
) Logger name is no longer a part of the message tag. Instead, it is now prepended to the message. 🔊 This causes a change of the logs structure. - [FEATURE] (
ktx-log
) AddedLogger.buildMessage
method that allows to modify logged message structure. This method can be overridden when extending theLogger
class, simplifying the usage of custom message formats.
-
v1.10.0-b1 Changes
- ⚡️ [UPDATE] Updated to LibGDX 1.10.0.
- [CHANGE] The Java source compatibility and JVM target version of the KTX modules was changed from 1.6 to 1.7.
-
v1.9.14-b2 Changes
- ⚡️ [UPDATE] Updated to Ashley 1.7.4.
- ⚡️ [UPDATE] Updated to Kotlin 1.4.32.
- ⚡️ [UPDATE] Updated to Kotlin Coroutines 1.4.3.
- ⚡️ [UPDATE] Updated to Gradle 6.8.3.
- ⚡️ [UPDATE] Updated to Dokka 1.4.30.
- [MISC] Due to the newly added support for multimodule projects in Dokka, published documentation URLs will change.
- [FEATURE] (
ktx-tiled
) AddedisEmpty
andisNotEmpty
extension function forMapLayers
andMapObjects
collections. - [FEATURE] (
ktx-tiled
) AddedforEachLayer
extension function forTiledMap
to iterate over an exact type ofMapLayer
instances of a specific map. - [FIX] (
ktx-vis
)visScrollPane
andvisSplitPane
now define the correct types forthis
in theisinit
lambdas, ➕ adding support for Scene2D and VisUI DSL.
-
v1.9.14-b1 Changes
- ⚡️ [UPDATE] Updated to LibGDX 1.9.14.
- ⚡️ [UPDATE] Updated to Kotlin 1.4.30.
- ⚡️ [UPDATE] Updated to VisUI 1.4.11.
- [FEATURE] (
ktx-app
)clearScreen
now accepts additionalclearDepth
boolean parameter that controls whether theGL_DEPTH_BUFFER_BIT
is added to the mask. - [FEATURE] (
ktx-assets-async
) AddedAssetStorageSnapshot
class that stores a copy ofAssetStorage
state 👍 for debugging purposes. Supports formatted string output withprettyFormat
. - [FEATURE] (
ktx-assets-async
)AssetStorage
now includestakeSnapshot
andtakeSnapshotAsync
methods that 👍 allow to copy and inspect the internal state of the storage for debugging purposes. - [FEATURE] (
ktx-collections
) AddedgetOrPut
extension function for LibGDX map collections includingObjectMap
,IdentityMap
,ArrayMap
andIntMap
.