From 91816d9c37a76e70c45d32599a7187d61f8b1672 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 21 Feb 2022 10:50:18 +0200 Subject: [PATCH] Added "copy to clipboard" button for mod errors --- core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt b/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt index 91aa85f9c2..5187bb25f3 100644 --- a/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt +++ b/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt @@ -338,6 +338,11 @@ class OptionsPopup(val previousScreen: BaseScreen) : Popup(previousScreen) { label.wrap = true it.add(label).width(stage.width / 2).row() } + if(!noProblem) + it.add("Copy to clipboard".toTextButton().onClick { + Gdx.app.clipboard.contents = lines.map { it.text }.filterNot { it=="" } + .joinToString("\n") + }).row() } val loadingLabel = modCheckResultTable.children.last()