net.peanuuutz.fork.ui.scene.component.ComposeComponents.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fork-ui Show documentation
Show all versions of fork-ui Show documentation
Comprehensive API designed for Minecraft modders
The newest version!
package net.peanuuutz.fork.ui.scene.component
import androidx.compose.runtime.Composable
import net.peanuuutz.fork.ui.scene.screen.ScreenCanvas
import net.peanuuutz.fork.ui.ui.draw.canvas.Canvas
inline fun ComposeComponent(
canvas: Canvas = ScreenCanvas(),
crossinline content: @Composable () -> Unit
): ComposeComponent {
return object : ComposeComponent(canvas) {
@Composable
override fun Content() {
content()
}
}
}