mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-12 08:49:22 +07:00
Allow to reveal explored resources from a city's demanding resources in CityOverviewTab
(#9287)
* allow to locate explored resources from a city's demanding resources in `CityOverviewTab` * better code of `updateCities` in `CityOverviewTab`
This commit is contained in:
@ -229,8 +229,14 @@ class CityOverviewTab(
|
|||||||
cityInfoTableDetails.add(image)
|
cityInfoTableDetails.add(image)
|
||||||
}
|
}
|
||||||
city.demandedResource.isNotEmpty() -> {
|
city.demandedResource.isNotEmpty() -> {
|
||||||
val image = ImageGetter.getResourcePortrait(city.demandedResource, iconSize *0.7f)
|
val image = ImageGetter.getResourcePortrait(city.demandedResource, iconSize *0.7f).apply {
|
||||||
image.addTooltip("Demanding [${city.demandedResource}]", 18f, tipAlign = Align.topLeft)
|
addTooltip("Demanding [${city.demandedResource}]", 18f, tipAlign = Align.topLeft)
|
||||||
|
onClick {
|
||||||
|
if (gameInfo.notifyExploredResources(viewingPlayer, city.demandedResource, 0, true)) {
|
||||||
|
overviewScreen.game.popScreen()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
cityInfoTableDetails.add(image)
|
cityInfoTableDetails.add(image)
|
||||||
}
|
}
|
||||||
else -> cityInfoTableDetails.add()
|
else -> cityInfoTableDetails.add()
|
||||||
|
Reference in New Issue
Block a user