https://kotlinlang.org logo
Title
s

SerVB

06/20/2020, 3:09 PM
I have a strange behavior with icon. This works:
suspend fun main() = Korge {
    val t = resourcesVfs["korge.png"].readBitmap()

    image(t)
}
However, if I add an icon, the program seems to block at
val t
line so no rendering happens after it:
suspend fun main() = Korge(icon = resourcesVfs["korge.png"].readBitmap()) {
    val t = resourcesVfs["korge.png"].readBitmap()

    image(t)
}
Is it expected?
d

Deactivated User

06/20/2020, 3:47 PM
Context is not set yet so maybe it is normal. You can use
iconPath
instead or in the main block: views.gameWindow.icon = resourcesVfs["korge.png"].readBitmap()
:tnx: 2