Skip to content

Commit 6828e44

Browse files
feat: Use MineMark for markdown rendering
1 parent 6e1235a commit 6828e44

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ repositories {
4848
includeGroupAndSubgroups("com.github")
4949
}
5050
}
51+
maven("https://maven.dediamondpro.dev/releases") {
52+
mavenContent {
53+
includeGroup("dev.dediamondpro")
54+
}
55+
}
5156
}
5257

5358
vineflower {
@@ -107,6 +112,8 @@ dependencies {
107112
isTransitive = false
108113
}
109114

115+
shadowMe("dev.dediamondpro:minemark-elementa:1.2.3")
116+
110117
shadowMeMod("com.github.Skytils:AsmHelper:91ecc2bd9c") {
111118
exclude(module = "kotlin-reflect")
112119
exclude(module = "kotlin-stdlib-jdk8")

src/main/kotlin/gg/skytils/skytilsmod/gui/updater/RequestUpdateGui.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
package gg.skytils.skytilsmod.gui.updater
2020

21+
import dev.dediamondpro.minemark.elementa.MineMarkComponent
2122
import gg.essential.elementa.ElementaVersion
2223
import gg.essential.elementa.WindowScreen
2324
import gg.essential.elementa.components.ScrollComponent
@@ -29,7 +30,6 @@ import gg.essential.elementa.dsl.basicHeightConstraint
2930
import gg.essential.elementa.dsl.childOf
3031
import gg.essential.elementa.dsl.constrain
3132
import gg.essential.elementa.dsl.pixels
32-
import gg.essential.elementa.markdown.MarkdownComponent
3333
import gg.skytils.skytilsmod.Skytils
3434
import gg.skytils.skytilsmod.core.UpdateChecker
3535
import gg.skytils.skytilsmod.gui.components.SimpleButton
@@ -62,7 +62,7 @@ class RequestUpdateGui : WindowScreen(ElementaVersion.V2, newGuiScale = 2) {
6262
height = basicHeightConstraint { window.getHeight() - 90 - authorText.getBottom() }
6363
width = RelativeConstraint(0.7f)
6464
} childOf window
65-
MarkdownComponent(updateObj.body.replace("*", ""))
65+
MineMarkComponent(updateObj.body)
6666
.constrain {
6767
height = RelativeConstraint()
6868
width = RelativeConstraint()
@@ -72,7 +72,7 @@ class RequestUpdateGui : WindowScreen(ElementaVersion.V2, newGuiScale = 2) {
7272
.constrain {
7373
x = CenterConstraint()
7474
y = SiblingConstraint(5f)
75-
width = 100.pixels()
75+
width = 150.pixels()
7676
height = 20.pixels()
7777
}.onMouseClick {
7878
Skytils.displayScreen = UpdateGui(true)
@@ -81,7 +81,7 @@ class RequestUpdateGui : WindowScreen(ElementaVersion.V2, newGuiScale = 2) {
8181
.constrain {
8282
x = CenterConstraint()
8383
y = SiblingConstraint(5f)
84-
width = 100.pixels()
84+
width = 150.pixels()
8585
height = 20.pixels()
8686
}.onMouseClick {
8787
Skytils.displayScreen = UpdateGui(false)
@@ -90,7 +90,7 @@ class RequestUpdateGui : WindowScreen(ElementaVersion.V2, newGuiScale = 2) {
9090
.constrain {
9191
x = CenterConstraint()
9292
y = SiblingConstraint(5f)
93-
width = 100.pixels()
93+
width = 150.pixels()
9494
height = 20.pixels()
9595
}.onMouseClick {
9696
UpdateChecker.updateGetter.updateObj = null

0 commit comments

Comments
 (0)