Files
Firmament/src/main/kotlin/moe/nea/notenoughupdates/gui/repogui.kt
2022-08-27 01:38:49 +02:00

37 lines
1.1 KiB
Kotlin

package moe.nea.notenoughupdates.gui
import moe.nea.notenoughupdates.repo.RepoManager
import net.minecraft.text.Text
fun repoGui(): ConfigGui<RepoManager.Config> {
return ConfigGui(RepoManager) {
title(Text.literal("NotEnoughUpdates Repo Settings"))
toggle(Text.literal("Auto Update"), RepoManager.Config::autoUpdate)
textfield(
Text.literal("Repo Username"),
Text.literal("<github user>"),
RepoManager.Config::user,
maxLength = 255
)
textfield(
Text.literal("Repo Name"),
Text.literal("<repo name>"),
RepoManager.Config::repo
)
textfield(
Text.literal("Repo Branch"),
Text.literal("<repo branch>"),
RepoManager.Config::branch
)
button(
Text.literal("Reset to Defaults"),
Text.literal("Reset"),
) {
RepoManager.config.user = "NotEnoughUpdates"
RepoManager.config.repo = "NotEnoughUpdates-REPO"
RepoManager.config.branch = "dangerous"
reload()
}
}
}