Skip to content

Commit

Permalink
KTX 1.13.1-rc1 release. #497
Browse files Browse the repository at this point in the history
  • Loading branch information
czyzby committed Feb 3, 2025
2 parents 562a938 + 26e7050 commit 0f28ade
Show file tree
Hide file tree
Showing 171 changed files with 6,646 additions and 4,038 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ charset = utf-8
indent_style = space
indent_size = 2
ktlint_standard_filename = disabled
ktlint_standard_property-naming = disabled
ktlint_code_style = ktlint_official
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# .git-blame-ignore-revs
# Ktlint 0.50.0 -> 1.5.0 update:
dc3b14bee634a5e25fee71e2fef856e2024b5deb

# Ktlint 0.42.1 -> 0.50.0 update:
2e91decb0f3cea8fd7ab953639cae74f01ce8a04
4 changes: 3 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,10 @@ should keep all the dependencies (outside of testing scope) up-to-date. Major de

- **libGDX**: update `gdxVersion` in the versions file and libGDX version in the tag on the top of the
[README.md](../README.md) file. Note that updating libGDX also affects the **KTX** version and milestones, so make sure
to update the [version.txt](../version.txt) and [milestones](https://github.com/libktx/ktx/milestones) as well.
to update the [version.txt](../version.txt) and [milestones](https://github.com/libktx/ktx/milestones) as well. After
the release, update GitHub project's `Custom properties`.
- **Kotlin**: update the `kotlinVersion` in the properties file and the Kotlin tag in the [README.md](../README.md).
After the release, update GitHub project's `Custom properties`.
- **Kotlin Coroutines**: update `kotlinCoroutinesVersion` in the versions file and the tag in the
`ktx-async` [README.md](../async/README.md).
- **Gradle**: run `gradle wrapper --distribution-type all` in the root project folder. Make sure that the
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
_See also: [the official libGDX changelog](https://github.com/libgdx/libgdx/blob/master/CHANGES)._

#### 1.13.1-rc1

- **[UPDATE]** Updated to libGDX 1.13.1.
- **[UPDATE]** Updated to Kotlin 2.1.10.
- **[UPDATE]** Updated to Kotlin Coroutines 1.10.1.
- **[UPDATE]** Updated to VisUI 1.5.5.
- **[UPDATE]** Updated to Dokka 2.0.0.
- **[CHANGE]** (`ktx-app`) `KtxGame` now calls `resize` _after_ `show` when `create` or `setScreen` are called.
This behavior now matches the official `Game` implementation.

#### 1.12.1-rc2

- **[UPDATE]** Updated to Kotlin 1.9.25.
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![GitHub Build](https://github.com/libktx/ktx/workflows/build/badge.svg)](https://github.com/libktx/ktx/actions?query=workflow%3Abuild)
[![Kotlin](https://img.shields.io/badge/kotlin-1.9.25-orange.svg)](http://kotlinlang.org/)
[![libGDX](https://img.shields.io/badge/libgdx-1.12.1-red.svg)](https://libgdx.com/)
[![Kotlin](https://img.shields.io/badge/kotlin-2.1.10-orange.svg)](http://kotlinlang.org/)
[![libGDX](https://img.shields.io/badge/libgdx-1.13.1-red.svg)](https://libgdx.com/)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.libktx/ktx-async.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.github.libktx%22)

[![KTX](.github/ktx-logo.png "KTX")](http://libktx.github.io)
Expand Down Expand Up @@ -221,7 +221,7 @@ with the `ktx-app` identifier would require the following changes in your `build
// Groovy DSL:
ext {
// Update this version to match the latest KTX release:
ktxVersion = '1.12.1-rc2'
ktxVersion = '1.13.1-rc1'
}
dependencies {
Expand All @@ -235,7 +235,7 @@ dependencies {

```kotlin
// Update this version to match the latest KTX release:
val ktxVersion = "1.12.1-rc2"
val ktxVersion = "1.13.1-rc1"

dependencies {
api(group = "io.github.libktx", name = "ktx-app", version = ktxVersion)
Expand Down Expand Up @@ -305,7 +305,7 @@ repositories {
ext {
// Update this version to match the latest libGDX release:
ktxVersion = '1.12.1-SNAPSHOT'
ktxVersion = '1.13.1-SNAPSHOT'
}
```

Expand All @@ -320,7 +320,7 @@ repositories {
}

// Update this version to match the latest libGDX release:
val ktxVersion = "1.12.1-SNAPSHOT"
val ktxVersion = "1.13.1-SNAPSHOT"
```

</details>
Expand Down
7 changes: 4 additions & 3 deletions actors/src/main/kotlin/ktx/actors/actions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ infix fun Action.then(action: Action): SequenceAction = Actions.sequence(this, a
* @return this [SequenceAction].
* @see plus for a non-mutating alternative.
*/
infix fun SequenceAction.then(action: Action): SequenceAction = apply {
addAction(action)
}
infix fun SequenceAction.then(action: Action): SequenceAction =
apply {
addAction(action)
}

/**
* Wraps this action and the passed action in a [SequenceAction].
Expand Down
11 changes: 9 additions & 2 deletions actors/src/main/kotlin/ktx/actors/actors.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,22 @@ fun Actor?.isShown(): Boolean = this != null && this.stage != null
* @param x actor's position on X axis in stage units.
* @param y actor's position on Y axis in stage units.
*/
fun Actor.setPosition(x: Int, y: Int) = setPosition(x.toFloat(), y.toFloat())
fun Actor.setPosition(
x: Int,
y: Int,
) = setPosition(x.toFloat(), y.toFloat())

/**
* Modifies this actor position to be centered within the passed bounds. Uses actor's size to calculate the offsets.
* @param width total available width in stage units. Defaults to stage width.
* @param height total available height in stage units. Defaults to stage height.
* @param normalize if true, position will be converted to ints. Defaults to true
*/
fun Actor.centerPosition(width: Float = this.stage.width, height: Float = this.stage.height, normalize: Boolean = true) {
fun Actor.centerPosition(
width: Float = this.stage.width,
height: Float = this.stage.height,
normalize: Boolean = true,
) {
val x = (width - this.width) / 2f
val y = (height - this.height) / 2f
if (normalize) {
Expand Down
Loading

0 comments on commit 0f28ade

Please sign in to comment.