Add ktree sample

This commit is contained in:
soywiz
2020-12-01 20:15:30 +01:00
parent 0de66afcab
commit de80a01ad1
4 changed files with 24 additions and 0 deletions

1
sample/ktree/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

View File

@@ -0,0 +1,8 @@
import com.soywiz.korge.gradle.*
apply plugin: com.soywiz.korge.gradle.KorgeGradlePlugin
korge {
id = "com.soywiz.samples.ktree"
targetDefault()
}

View File

@@ -0,0 +1,9 @@
import com.soywiz.korge.*
import com.soywiz.korge.view.*
import com.soywiz.korge.view.ktree.*
import com.soywiz.korim.color.*
import com.soywiz.korio.file.std.*
suspend fun main() = Korge(bgcolor = Colors["#172335"]) {
addChild(resourcesVfs["scene.ktree"].readKTree(views()))
}

View File

@@ -0,0 +1,6 @@
<container>
<solidrect name="big" colorMul="#ff7700ff" x="266.0" y="266.0" scaleX="1.2985" scaleY="1.2985" width="187.76037196064794" height="190.27994117181697"/>
<container>
<solidrect name="small" colorMul="#ff0000ff" x="266.0" y="266.0" anchorY="1.0" width="100.0" height="100.0"/>
</container>
</container>