ktx v1.10.0-rc1 Release Notes
-
- ⚡️ [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<*>
.