From 5fb3ab268b0f3fdd4fad82732bc64317835cc04e Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 30 Jan 2024 20:06:04 +0200 Subject: [PATCH] Added 'copy to clipboard' button on map errors so we can debug them --- core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt b/core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt index 6161f8cf97..6be5b0e645 100644 --- a/core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt +++ b/core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt @@ -19,7 +19,6 @@ import com.unciv.models.metadata.GameSetupInfo import com.unciv.models.ruleset.Ruleset import com.unciv.models.ruleset.RulesetCache import com.unciv.models.translations.tr -import com.unciv.ui.components.widgets.ExpanderTab import com.unciv.ui.components.extensions.addSeparator import com.unciv.ui.components.extensions.addSeparatorVertical import com.unciv.ui.components.extensions.disable @@ -31,6 +30,7 @@ import com.unciv.ui.components.input.KeyCharAndCode import com.unciv.ui.components.input.keyShortcuts import com.unciv.ui.components.input.onActivation import com.unciv.ui.components.input.onClick +import com.unciv.ui.components.widgets.ExpanderTab import com.unciv.ui.images.ImageGetter import com.unciv.ui.popups.ConfirmPopup import com.unciv.ui.popups.Popup @@ -309,6 +309,9 @@ class NewGameScreen( reuseWith("It looks like we can't make a map with the parameters you requested!") row() addGoodSizedLabel("Maybe you put too many players into too small a map?").row() + addButton("Copy to clipboard"){ + Gdx.app.clipboard.contents = exception.stackTraceToString() + } addCloseButton() } Gdx.input.inputProcessor = stage