Make map editor respond to max zoom setting. (#8179)

This commit is contained in:
Philip Keiter
2022-12-19 00:31:20 -06:00
committed by GitHub
parent 107edeab1f
commit 757f06e3ca

View File

@ -46,6 +46,13 @@ class EditorMapHolder(
continuousScrollingX = tileMap.mapParameters.worldWrap
addTiles(parentScreen.stage)
if (editorScreen != null) addCaptureListener(getDragPaintListener())
reloadMaxZoom()
}
internal fun reloadMaxZoom() {
maxZoom = UncivGame.Current.settings.maxWorldZoomOut
minZoom = 1f / maxZoom
if (scaleX < minZoom) zoom(1f) // since normally min isn't reached exactly, only powers of 0.8
}
internal fun addTiles(stage: Stage) {