Skip to content

Commit 3e8e6e1

Browse files
committed
fíx: compile
1 parent ca27cd4 commit 3e8e6e1

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

shale/src/main/kotlin/moe/nea/shale/render/minecraft/MinecraftGraphicsContext.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package moe.nea.shale.render.minecraft
22

33
import io.github.notenoughupdates.moulconfig.common.RenderContext
4+
import io.github.notenoughupdates.moulconfig.common.text.StructuredText
45
import moe.nea.shale.layout.Area
56
import moe.nea.shale.layout.MeasuredText
67
import moe.nea.shale.layout.Position
@@ -27,7 +28,7 @@ class MinecraftGraphicsContext(
2728
val font = renderContext.minecraft.defaultFontRenderer
2829

2930
override fun measureWrappedText(text: String, width: Int): MeasuredText {
30-
val lines = font.splitText(text, width)
31+
val lines = font.splitText(StructuredText.of(text), width)
3132
val size = Size(
3233
lines.maxOfOrNull { font.getStringWidth(it) } ?: 0,
3334
font.height * lines.size
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package moe.nea.shale.render.minecraft
22

3+
import io.github.notenoughupdates.moulconfig.common.text.StructuredText
34
import moe.nea.shale.layout.MeasuredText
45
import moe.nea.shale.layout.Size
56

67
data class MinecraftWrappedText(
7-
val lines: List<String>,
8+
val lines: List<StructuredText>,
89
override val size: Size
910
) : MeasuredText

shale/src/main/kotlin/moe/nea/shale/render/minecraft/ShaleComponent.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ class ShaleComponent(val tree: RootElement) : GuiComponent() {
2424
}
2525

2626
fun openScreen() {
27-
IMinecraft.instance.openWrappedScreen(this)
27+
IMinecraft.INSTANCE.openWrappedScreen(this)
2828
}
2929
}

0 commit comments

Comments
 (0)