From 72f63b7ba193d72882ebeac2d4edb52d26cac505 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 21 Apr 2021 20:30:25 +0300 Subject: [PATCH] Added "open Github page of mod" in mod management screen --- .../src/com/unciv/ui/pickerscreens/ModManagementScreen.kt | 8 +++++++- core/src/com/unciv/ui/worldscreen/mainmenu/DropBox.kt | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/ui/pickerscreens/ModManagementScreen.kt b/core/src/com/unciv/ui/pickerscreens/ModManagementScreen.kt index 9d2441daf3..beaccc49d9 100644 --- a/core/src/com/unciv/ui/pickerscreens/ModManagementScreen.kt +++ b/core/src/com/unciv/ui/pickerscreens/ModManagementScreen.kt @@ -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) }) diff --git a/core/src/com/unciv/ui/worldscreen/mainmenu/DropBox.kt b/core/src/com/unciv/ui/worldscreen/mainmenu/DropBox.kt index 9110de8aad..108f4e62b9 100644 --- a/core/src/com/unciv/ui/worldscreen/mainmenu/DropBox.kt +++ b/core/src/com/unciv/ui/worldscreen/mainmenu/DropBox.kt @@ -196,6 +196,7 @@ object Github { var svn_url = "" var stargazers_count = 0 var default_branch = "" + var html_url = "" } }