From 97a9a0f08cfd56c34f0326c3d974cccf0f2d5b0f Mon Sep 17 00:00:00 2001 From: Jack Rainy Date: Thu, 12 Mar 2020 08:32:29 +0200 Subject: [PATCH] Display an amount of gold when buying the tile (#2127) --- android/assets/jsons/translations/Russian.properties | 1 + android/assets/jsons/translations/Ukrainian.properties | 1 + android/assets/jsons/translations/template.properties | 1 + core/src/com/unciv/ui/cityscreen/CityScreenTileTable.kt | 3 ++- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/android/assets/jsons/translations/Russian.properties b/android/assets/jsons/translations/Russian.properties index 8398e36e..2b4fc190 100644 --- a/android/assets/jsons/translations/Russian.properties +++ b/android/assets/jsons/translations/Russian.properties @@ -837,6 +837,7 @@ Raze city = Разрушить город Stop razing city = Отменить разрушение города Buy for [amount] gold = Купить за [amount] золота Buy = Купить +You have [amount] gold = У вас есть [amount] золота Currently you have [amount] gold. = Сейчас у вас есть [amount] золота. Would you like to purchase [constructionName] for [buildingGoldCost] gold? = Хотите купить [constructionName] за [buildingGoldCost] золота? No space available to place [unit] near [city] = Возле [city] нет места, чтобы разместить [unit] diff --git a/android/assets/jsons/translations/Ukrainian.properties b/android/assets/jsons/translations/Ukrainian.properties index abf4871a..491705c6 100644 --- a/android/assets/jsons/translations/Ukrainian.properties +++ b/android/assets/jsons/translations/Ukrainian.properties @@ -817,6 +817,7 @@ Raze city = Зруйнувати місто Stop razing city = Зупинити руйнування міста Buy for [amount] gold = Купити за [amount] золота Buy = Купити +You have [amount] gold = У вас є [amount] золота Currently you have [amount] gold. = Зараз у вас в наявності [amount] золота. Would you like to purchase [constructionName] for [buildingGoldCost] gold? = Бажаєте придбати [constructionName] за [buildingGoldCost] золота? No space available to place [unit] near [city] = Біля [city] немає місця, щоб розмістити [unit] diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index 846c6b23..293cadcf 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -813,6 +813,7 @@ Raze city = Stop razing city = Buy for [amount] gold = Buy = +You have [amount] gold = Currently you have [amount] gold. = Would you like to purchase [constructionName] for [buildingGoldCost] gold? = No space available to place [unit] near [city] = diff --git a/core/src/com/unciv/ui/cityscreen/CityScreenTileTable.kt b/core/src/com/unciv/ui/cityscreen/CityScreenTileTable.kt index d617af05..2349fefc 100644 --- a/core/src/com/unciv/ui/cityscreen/CityScreenTileTable.kt +++ b/core/src/com/unciv/ui/cityscreen/CityScreenTileTable.kt @@ -49,7 +49,8 @@ class CityScreenTileTable(val city: CityInfo): Table(){ if(goldCostOfTile>city.civInfo.gold || city.isPuppet || !UncivGame.Current.worldScreen.isPlayersTurn) buyTileButton.disable() - innerTable.add(buyTileButton) + innerTable.add(buyTileButton).row() + innerTable.add("You have [${city.civInfo.gold}] gold".toLabel(Color.YELLOW, 16)).padTop(2f) } if(city.canAcquireTile(selectedTile)) { val acquireTileButton = TextButton("Acquire".tr(), CameraStageBaseScreen.skin)