mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-11 11:28:03 +07:00
Bug: turnsLabel accumulates touchFocuses endlessly (#3874)
* Bug: turnsLabel accumulates touchFocuses endlessly * May resolve #3862: Resource revealed notification can point to all reveals - better
This commit is contained in:
parent
a25777f380
commit
d679632523
@ -58,6 +58,7 @@ class WorldScreenTopBar(val worldScreen: WorldScreen) : Table() {
|
||||
private fun getResourceTable(): Table {
|
||||
val resourceTable = Table()
|
||||
resourceTable.defaults().pad(5f)
|
||||
turnsLabel.onClick { worldScreen.game.setScreen(VictoryScreen(worldScreen)) }
|
||||
resourceTable.add(turnsLabel).padRight(20f)
|
||||
val revealedStrategicResources = worldScreen.gameInfo.ruleSet.tileResources.values
|
||||
.filter { it.resourceType == ResourceType.Strategic } // && currentPlayerCivInfo.tech.isResearched(it.revealedBy!!) }
|
||||
@ -189,7 +190,6 @@ class WorldScreenTopBar(val worldScreen: WorldScreen) : Table() {
|
||||
|
||||
val yearText = "[" + abs(year) + "] " + if (year < 0) "BC" else "AD"
|
||||
turnsLabel.setText(Fonts.turn + "" + civInfo.gameInfo.turns + " | " + yearText.tr())
|
||||
turnsLabel.onClick { worldScreen.game.setScreen(VictoryScreen(worldScreen)) }
|
||||
|
||||
val nextTurnStats = civInfo.statsForNextTurn
|
||||
val goldPerTurn = "(" + (if (nextTurnStats.gold > 0) "+" else "") + nextTurnStats.gold.roundToInt() + ")"
|
||||
|
Loading…
Reference in New Issue
Block a user