κoωo (kowo-lib)
ModrinthFancy™ kotlin syntax for oωo-lib
1.0k Downloads 3 Follower aktualisiert 13mo ago
neueste v0.12.20b+1.21.5 Modrinth
![]()
Fancy™ kotlin syntax for oωo-lib
Setup
In your build.gradle file, add these lines:
repositories {
maven { url "https://api.modrinth.com/maven" }
maven { url "https://maven.wispforest.io/releases" }
}
dependencies {
modImplementation include("maven.modrinth:kowo-lib:0.12.20b+1.21.5")
modImplementation "io.wispforest:owo-lib:0.12.20+1.21.5"
// only if you plan to use owo-config
// annotationProcessor "io.wispforest:owo-lib:0.12.20+1.21.5"
}
kotlin {
compilerOptions {
freeCompilerArgs.add("-Xcontext-parameters")
}
}
Example usage
import xyz.bonfiremc.kowo.dsl.*
class SizingTestKuwuScreen : BaseOwoScreen<FlowLayout>() {
override fun createAdapter(): OwoUIAdapter<FlowLayout> {
return OwoUIAdapter.create(this, ::verticalFlow)
}
override fun build(rootComponent: FlowLayout) {
root {
verticalAlignment = VerticalAlignment.CENTER
horizontalAlignment = HorizontalAlignment.CENTER
+stack(Sizing.content(), Sizing.content()).apply {
padding {
all(15)
}
horizontalAlignment = HorizontalAlignment.CENTER
surface = Surface.panelWithInset(6)
val animation: Animation<Sizing> = horizontalSizing().animate(500, Easing.CUBIC, 75.fill)
+button("initialize sizenite".literal).apply {
horizontalSizing = 50.fill
onPress {
animation.reverse()
}
}
}
+label("bruh".literal.styled { it.withClickEvent(ClickEvent.OpenUrl(URI.create("https://wispforest.io"))) })
}
}
}
More examples on GitHub
TODO
- [x] Simplified way to add child to parent component
- [ ] More examples
- [ ] Styling with MSS (Minecraft Style Sheets)
Versionen
Beta
0.12.20b+1.21.5
# Changes
- Added simplified way to add child
- `positioning` now available for `Component`
Beta
0.12.20+1.21.5
# Changes
- Updated to 1.21.5
- Updated oωo to 0.12.20+1.21.5
- Now oωo is not included in .jar
- Fully rewrited, see…
Alpha
0.12.10+1.21
- Ported to Minecraft 1.21
- Updated to oωo 0.12.10
- Now uses Kotlin 2.0.0
- Added custom components support

Kommentare 0
Noch keine Kommentare. Sei der Erste, der seine Meinung teilt.