com.soywiz.korge.ui.UIPlugin.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of korge-ext-ui-common Show documentation
Show all versions of korge-ext-ui-common Show documentation
Korge: Kotlin cORoutines Game Engine
package com.soywiz.korge.ui
import com.soywiz.korge.plugin.KorgePlugin
import com.soywiz.korge.resources.Path
import com.soywiz.korge.resources.ResourcesRoot
import com.soywiz.korge.resources.VPath
import com.soywiz.korge.resources.getPath
import com.soywiz.korge.view.Views
object UIPlugin : KorgePlugin() {
suspend override fun register(views: Views) {
views.injector.mapSingleton { UIFactory() }
views.injector.mapFactory(UISkin::class) {
UISkin.Factory(
getOrNull(Path::class),
getOrNull(VPath::class),
get(ResourcesRoot::class),
get(Views::class)
)
}
}
}