mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-24 22:59:34 +07:00
World screen centers on capital instead of zero position
This commit is contained in:
@ -70,7 +70,13 @@ class WorldScreen : CameraStageBaseScreen() {
|
|||||||
|
|
||||||
update()
|
update()
|
||||||
|
|
||||||
tileMapHolder.setCenterPosition(Vector2.Zero)
|
val tileToCenterOn: Vector2 =
|
||||||
|
when {
|
||||||
|
civInfo.cities.isNotEmpty() -> civInfo.getCapital().location
|
||||||
|
civInfo.getCivUnits().isNotEmpty() -> civInfo.getCivUnits().first().getTile().position
|
||||||
|
else -> Vector2.Zero
|
||||||
|
}
|
||||||
|
tileMapHolder.setCenterPosition(tileToCenterOn)
|
||||||
createNextTurnButton() // needs civ table to be positioned
|
createNextTurnButton() // needs civ table to be positioned
|
||||||
displayTutorials("NewGame")
|
displayTutorials("NewGame")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user