mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-21 21:30:20 +07:00
World screen centers on capital instead of zero position
This commit is contained in:
@ -70,7 +70,13 @@ class WorldScreen : CameraStageBaseScreen() {
|
||||
|
||||
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
|
||||
displayTutorials("NewGame")
|
||||
}
|
||||
|
Reference in New Issue
Block a user