added button to paste from clipboard when downloading a mod (#8101)

This commit is contained in:
alexban011 2022-12-07 21:14:54 +02:00 committed by GitHub
parent ff25014a54
commit ccb1d769f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -1534,6 +1534,7 @@ Update [modName] =
Could not download mod list =
Download mod from URL =
Please enter the mod repository -or- archive zip url: =
Paste from clipboard =
Download =
Done! =
Delete [modName] =

View File

@ -388,6 +388,11 @@ class ModManagementScreen(
popup.addGoodSizedLabel("Please enter the mod repository -or- archive zip url:").row()
val textField = UncivTextField.create("")
popup.add(textField).width(stage.width / 2).row()
val pasteLinkButton = "Paste from clipboard".toTextButton()
pasteLinkButton.onClick {
textField.text = Gdx.app.clipboard.contents
}
popup.add(pasteLinkButton).row()
val actualDownloadButton = "Download".toTextButton()
actualDownloadButton.onClick {
actualDownloadButton.setText("Downloading...".tr())