mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-19 16:57:38 +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:
parent
cccaa88456
commit
03ffa84bd3
@ -229,8 +229,14 @@ class CityOverviewTab(
|
||||
cityInfoTableDetails.add(image)
|
||||
}
|
||||
city.demandedResource.isNotEmpty() -> {
|
||||
val image = ImageGetter.getResourcePortrait(city.demandedResource, iconSize *0.7f)
|
||||
image.addTooltip("Demanding [${city.demandedResource}]", 18f, tipAlign = Align.topLeft)
|
||||
val image = ImageGetter.getResourcePortrait(city.demandedResource, iconSize *0.7f).apply {
|
||||
addTooltip("Demanding [${city.demandedResource}]", 18f, tipAlign = Align.topLeft)
|
||||
onClick {
|
||||
if (gameInfo.notifyExploredResources(viewingPlayer, city.demandedResource, 0, true)) {
|
||||
overviewScreen.game.popScreen()
|
||||
}
|
||||
}
|
||||
}
|
||||
cityInfoTableDetails.add(image)
|
||||
}
|
||||
else -> cityInfoTableDetails.add()
|
||||
|
Loading…
Reference in New Issue
Block a user