Skip to content

Commit

Permalink
⬆ Upgrade to KorGE 2.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
TobseF committed Mar 8, 2022
1 parent ad7352b commit a378d86
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 2 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ import com.soywiz.korge.gradle.korge
buildscript {
val korgePluginVersion: String by project


repositories {
mavenLocal()
maven { url = uri("https://dl.bintray.com/korlibs/korlibs") }
maven { url = uri("https://plugins.gradle.org/m2/") }
mavenCentral()
google()
maven { url = uri("https://dl.bintray.com/kotlin/kotlin-dev") }
maven { url = uri("https://dl.bintray.com/kotlin/kotlin-eap") }

maven { url = uri("https://plugins.gradle.org/m2/") }
}

dependencies {
classpath("com.soywiz.korlibs.korge.plugins:korge-gradle-plugin:$korgePluginVersion")
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
korgePluginVersion = 2.1.1.1
korgePluginVersion = 2.6.2
org.gradle.jvmargs = -Xmx4g
kotlin.mpp.stability.nowarn = true
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import com.soywiz.korim.color.RGBA
import com.soywiz.korim.font.Font
import com.soywiz.korim.font.SystemFontRegistry

inline fun Container.text(text: String,
inline fun Container.text(
text: String,
textSize: Double = 16.0,
font: Font = SystemFontRegistry.DEFAULT_FONT,
font: Font,
color: RGBA = Colors.WHITE,
callback: Text.() -> Unit = {}) = Text(
callback: Text.() -> Unit = {}
) = Text(
text, textSize = textSize, font = font, color = color).addTo(this).apply(callback)
14 changes: 8 additions & 6 deletions src/commonMain/kotlin/de/tfr/game/util/extensions/Graphics.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ fun Graphics.drawFill(color: RGBA, renderAction: (Graphics) -> Any) {
this.endFill()
}

fun Container.text(text: String,
x: Double,
y: Double,
font: Font = SystemFontRegistry.DEFAULT_FONT,
textSize: Double,
color: RGBA = Colors.WHITE): Text {
fun Container.text(
text: String,
x: Double,
y: Double,
font: Font,
textSize: Double,
color: RGBA = Colors.WHITE
): Text {

return text(text, textSize, font = font, color = color) {
position(x, y)
Expand Down

0 comments on commit a378d86

Please sign in to comment.