Added "open Github page of mod" in mod management screen

This commit is contained in:
Yair Morgenstern 2021-04-21 20:30:25 +03:00
parent 0c80a31c9a
commit 72f63b7ba1
2 changed files with 8 additions and 1 deletions

View File

@ -70,6 +70,11 @@ class ModManagementScreen: PickerScreen() {
rightSideButton.setText("Downloaded!".tr())
}
}
modActionTable.clear()
modActionTable.add("Open Github page".toTextButton().onClick {
Gdx.net.openURI(repo.html_url)
})
}
downloadTable.add(downloadButton).row()
}
@ -132,7 +137,8 @@ class ModManagementScreen: PickerScreen() {
val visualMods = game.settings.visualMods
if (!visualMods.contains(mod.name))
modActionTable.add("Enable as permanent visual mod".toTextButton().onClick {
visualMods.add(mod.name); game.settings.save()
visualMods.add(mod.name)
game.settings.save()
ImageGetter.setNewRuleset(ImageGetter.ruleset)
refreshModActions(mod)
})

View File

@ -196,6 +196,7 @@ object Github {
var svn_url = ""
var stargazers_count = 0
var default_branch = ""
var html_url = ""
}
}