package moe.nea.notenoughupdates.gui import moe.nea.notenoughupdates.repo.RepoManager import net.minecraft.text.Text fun repoGui(): ConfigGui { return ConfigGui(RepoManager) { title(Text.literal("NotEnoughUpdates Repo Settings")) toggle(Text.literal("Auto Update"), RepoManager.Config::autoUpdate) textfield( Text.literal("Repo Username"), Text.literal(""), RepoManager.Config::user, maxLength = 255 ) textfield( Text.literal("Repo Name"), Text.literal(""), RepoManager.Config::repo ) textfield( Text.literal("Repo Branch"), Text.literal(""), 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() } } }